
/* A Bison parser, made by GNU Bison 2.4.1.  */

/* Skeleton implementation for Bison's Yacc-like parsers in C
   
      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
   Free Software Foundation, Inc.
   
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation, either version 3 of the License, or
   (at your option) any later version.
   
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.
   
   You should have received a copy of the GNU General Public License
   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */

/* As a special exception, you may create a larger work that contains
   part or all of the Bison parser skeleton and distribute that work
   under terms of your choice, so long as that work isn't itself a
   parser generator using the skeleton or a modified version thereof
   as a parser skeleton.  Alternatively, if you modify or redistribute
   the parser skeleton itself, you may (at your option) remove this
   special exception, which will cause the skeleton and the resulting
   Bison output files to be licensed under the GNU General Public
   License without this special exception.
   
   This special exception was added by the Free Software Foundation in
   version 2.2 of Bison.  */

/* C LALR(1) parser skeleton written by Richard Stallman, by
   simplifying the original so-called "semantic" parser.  */

/* All symbols defined below should begin with yy or YY, to avoid
   infringing on user name space.  This should be done even for local
   variables, as they might otherwise be expanded by user macros.
   There are some unavoidable exceptions within include files to
   define necessary library symbols; they are noted "INFRINGES ON
   USER NAME SPACE" below.  */

/* Identify Bison output.  */
#define YYBISON 1

/* Bison version.  */
#define YYBISON_VERSION "2.4.1"

/* Skeleton name.  */
#define YYSKELETON_NAME "yacc.c"

/* Pure parsers.  */
#define YYPURE 0

/* Push parsers.  */
#define YYPUSH 0

/* Pull parsers.  */
#define YYPULL 1

/* Using locations.  */
#define YYLSP_NEEDED 0



/* Copy the first part of user declarations.  */

/* Line 189 of yacc.c  */
#line 1 "gram.y"
 /* -*-text-*- */

#define YYDEBUG 1
/*-------------------------------------------------------------------------
 *
 * gram.y--
 *    openPlant YACC rules/actions
 *-------------------------------------------------------------------------
 */
#include <string.h>
#include <ctype.h>
#include "global_def.h"
#include "nodes/op_list.h"
#include "nodes/parse_nodes.h"
#include "print/print.h"

static char saved_rel_name[BUFSIZ];  /* need this for complex attributes */
static bool QueryIsRule = FALSE;

extern list_t *parse_tree;

/*
 * If you need access to certain yacc-generated variables and find that
 * they're static by default, uncomment the next line.  (this is not a
 * problem, yet.)
 */
/*#define __YYSCLASS*/

void yyerror(char message[]);
extern int yylex (void);

static const char *xlateSqlType(char *);
static node_t *make_a_expr(int op, char *opname, node_t *lexpr, node_t *rexpr);
void parser_init(oid_t *typev, int nargs);
int yyparse();

/* old versions of flex define this as a macro */
#if defined(yywrap)
#undef yywrap
#endif /* yywrap */


/* Line 189 of yacc.c  */
#line 116 "gram.tab.c"

/* Enabling traces.  */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif

/* Enabling verbose error messages.  */
#ifdef YYERROR_VERBOSE
# undef YYERROR_VERBOSE
# define YYERROR_VERBOSE 1
#else
# define YYERROR_VERBOSE 0
#endif

/* Enabling the token table.  */
#ifndef YYTOKEN_TABLE
# define YYTOKEN_TABLE 0
#endif


/* Tokens.  */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
   /* Put the tokens into the symbol table, so that GDB and other debuggers
      know about them.  */
   enum yytokentype {
     ABORT_TRANS = 258,
     ACL = 259,
     ADD = 260,
     AFTER = 261,
     AGGREGATE = 262,
     ALL = 263,
     ALTER = 264,
     AND = 265,
     APPEND = 266,
     ARCHIVE = 267,
     ARCH_STORE = 268,
     AS = 269,
     ASC = 270,
     BACKWARD = 271,
     BEFORE = 272,
     BEGIN_TRANS = 273,
     BINARY = 274,
     BY = 275,
     CAST = 276,
     CHANGE = 277,
     CLOSE = 278,
     CLUSTER = 279,
     COLUMN = 280,
     COMMIT = 281,
     COPY = 282,
     CREATE = 283,
     CURRENT = 284,
     CURSOR = 285,
     DATABASE = 286,
     DECLARE = 287,
     DELETE = 288,
     DELIMITERS = 289,
     DESC = 290,
     DISTINCT = 291,
     DO = 292,
     DROP = 293,
     END_TRANS = 294,
     EXTEND = 295,
     FETCH = 296,
     FOR = 297,
     FORWARD = 298,
     FROM = 299,
     FUNCTION = 300,
     GRANT = 301,
     GROUP = 302,
     HAVING = 303,
     HEAVY = 304,
     IN = 305,
     INDEX = 306,
     INHERITS = 307,
     INSERT = 308,
     INSTEAD = 309,
     INTO = 310,
     ISNULL = 311,
     LANGUAGE = 312,
     LIGHT = 313,
     LISTEN = 314,
     LOAD = 315,
     MERGE = 316,
     MOVE = 317,
     NEW = 318,
     NONE = 319,
     NOT = 320,
     NOTHING = 321,
     NOTIFY = 322,
     NOTNULL = 323,
     OIDS = 324,
     ON = 325,
     OPERATOR = 326,
     OPTION = 327,
     OR = 328,
     ORDER = 329,
     PNULL = 330,
     PRIVILEGES = 331,
     PUBLIC = 332,
     PURGE = 333,
     P_TYPE = 334,
     RENAME = 335,
     REPLACE = 336,
     RETRIEVE = 337,
     RETURNS = 338,
     REVOKE = 339,
     ROLLBACK = 340,
     RULE = 341,
     SELECT = 342,
     SET = 343,
     SETOF = 344,
     STDIN = 345,
     STDOUT = 346,
     STORE = 347,
     TABLE = 348,
     TO = 349,
     TRANSACTION = 350,
     UPDATE = 351,
     USING = 352,
     VACUUM = 353,
     VALUES = 354,
     VERSION = 355,
     VIEW = 356,
     WHERE = 357,
     WITH = 358,
     WORK = 359,
     EXECUTE = 360,
     RECIPE = 361,
     EXPLAIN = 362,
     LIKE = 363,
     IDENT = 364,
     SCONST = 365,
     Op = 366,
     ICONST = 367,
     PARAM = 368,
     FCONST = 369,
     OP = 370,
     UMINUS = 371,
     TYPECAST = 372,
     REDUCE = 373
   };
#endif



#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
{

/* Line 214 of yacc.c  */
#line 44 "gram.y"

	double 		dval;
	int			ival;
	char        chr;
	char		*str;
	bool		boolean;
	list_t		*list;
	node_t		*node;
	parse_value_t		*value;

	attr_t		*attr;

	column_def_t		*coldef;
	type_name_t		*typnam;
	def_elem_t		*defelt;
	param_string_t		*param;
	sort_by_t		*sortby;
	index_elem_t		*ielem;
	range_var_t		*range;
	rel_expr_t		*relexp;
	time_range_t		*trange;
	a_indices_t		*aind;
	res_target_t		*target;
	param_no_t		*paramno;

	version_stmt_t		*vstmt;
	define_stmt_t		*dstmt;
	purge_stmt_t		*pstmt;
	rule_stmt_t		*rstmt;
	insert_stmt_t		*astmt;



/* Line 214 of yacc.c  */
#line 304 "gram.tab.c"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
#endif


/* Copy the second part of user declarations.  */


/* Line 264 of yacc.c  */
#line 316 "gram.tab.c"

#ifdef short
# undef short
#endif

#ifdef YYTYPE_UINT8
typedef YYTYPE_UINT8 yytype_uint8;
#else
typedef unsigned char yytype_uint8;
#endif

#ifdef YYTYPE_INT8
typedef YYTYPE_INT8 yytype_int8;
#elif (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
typedef signed char yytype_int8;
#else
typedef short int yytype_int8;
#endif

#ifdef YYTYPE_UINT16
typedef YYTYPE_UINT16 yytype_uint16;
#else
typedef unsigned short int yytype_uint16;
#endif

#ifdef YYTYPE_INT16
typedef YYTYPE_INT16 yytype_int16;
#else
typedef short int yytype_int16;
#endif

#ifndef YYSIZE_T
# ifdef __SIZE_TYPE__
#  define YYSIZE_T __SIZE_TYPE__
# elif defined size_t
#  define YYSIZE_T size_t
# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
#  define YYSIZE_T size_t
# else
#  define YYSIZE_T unsigned int
# endif
#endif

#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)

#ifndef YY_
# if YYENABLE_NLS
#  if ENABLE_NLS
#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
#   define YY_(msgid) dgettext ("bison-runtime", msgid)
#  endif
# endif
# ifndef YY_
#  define YY_(msgid) msgid
# endif
#endif

/* Suppress unused-variable warnings by "using" E.  */
#if ! defined lint || defined __GNUC__
# define YYUSE(e) ((void) (e))
#else
# define YYUSE(e) /* empty */
#endif

/* Identity function, used to suppress warnings about constant conditions.  */
#ifndef lint
# define YYID(n) (n)
#else
#if (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
static int
YYID (int yyi)
#else
static int
YYID (yyi)
    int yyi;
#endif
{
  return yyi;
}
#endif

#if ! defined yyoverflow || YYERROR_VERBOSE

/* The parser invokes alloca or malloc; define the necessary symbols.  */

# ifdef YYSTACK_USE_ALLOCA
#  if YYSTACK_USE_ALLOCA
#   ifdef __GNUC__
#    define YYSTACK_ALLOC __builtin_alloca
#   elif defined __BUILTIN_VA_ARG_INCR
#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
#   elif defined _AIX
#    define YYSTACK_ALLOC __alloca
#   elif defined _MSC_VER
#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
#    define alloca _alloca
#   else
#    define YYSTACK_ALLOC alloca
#    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
#     ifndef _STDLIB_H
#      define _STDLIB_H 1
#     endif
#    endif
#   endif
#  endif
# endif

# ifdef YYSTACK_ALLOC
   /* Pacify GCC's `empty if-body' warning.  */
#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
#  ifndef YYSTACK_ALLOC_MAXIMUM
    /* The OS might guarantee only one guard page at the bottom of the stack,
       and a page size can be as small as 4096 bytes.  So we cannot safely
       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
       to allow for a few compiler-allocated temporary stack slots.  */
#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
#  endif
# else
#  define YYSTACK_ALLOC YYMALLOC
#  define YYSTACK_FREE YYFREE
#  ifndef YYSTACK_ALLOC_MAXIMUM
#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
#  endif
#  if (defined __cplusplus && ! defined _STDLIB_H \
       && ! ((defined YYMALLOC || defined malloc) \
	     && (defined YYFREE || defined free)))
#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
#   ifndef _STDLIB_H
#    define _STDLIB_H 1
#   endif
#  endif
#  ifndef YYMALLOC
#   define YYMALLOC malloc
#   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
#   endif
#  endif
#  ifndef YYFREE
#   define YYFREE free
#   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
void free (void *); /* INFRINGES ON USER NAME SPACE */
#   endif
#  endif
# endif
#endif /* ! defined yyoverflow || YYERROR_VERBOSE */


#if (! defined yyoverflow \
     && (! defined __cplusplus \
	 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))

/* A type that is properly aligned for any stack member.  */
union yyalloc
{
  yytype_int16 yyss_alloc;
  YYSTYPE yyvs_alloc;
};

/* The size of the maximum gap between one aligned stack and the next.  */
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)

/* The size of an array large to enough to hold all stacks, each with
   N elements.  */
# define YYSTACK_BYTES(N) \
     ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
      + YYSTACK_GAP_MAXIMUM)

/* Copy COUNT objects from FROM to TO.  The source and destination do
   not overlap.  */
# ifndef YYCOPY
#  if defined __GNUC__ && 1 < __GNUC__
#   define YYCOPY(To, From, Count) \
      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
#  else
#   define YYCOPY(To, From, Count)		\
      do					\
	{					\
	  YYSIZE_T yyi;				\
	  for (yyi = 0; yyi < (Count); yyi++)	\
	    (To)[yyi] = (From)[yyi];		\
	}					\
      while (YYID (0))
#  endif
# endif

/* Relocate STACK from its old location to the new one.  The
   local variables YYSIZE and YYSTACKSIZE give the old and new number of
   elements in the stack, and YYPTR gives the new location of the
   stack.  Advance YYPTR to a properly aligned location for the next
   stack.  */
# define YYSTACK_RELOCATE(Stack_alloc, Stack)				\
    do									\
      {									\
	YYSIZE_T yynewbytes;						\
	YYCOPY (&yyptr->Stack_alloc, Stack, yysize);			\
	Stack = &yyptr->Stack_alloc;					\
	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
	yyptr += yynewbytes / sizeof (*yyptr);				\
      }									\
    while (YYID (0))

#endif

/* YYFINAL -- State number of the termination state.  */
#define YYFINAL  139
/* YYLAST -- Last index in YYTABLE.  */
#define YYLAST   1030

/* YYNTOKENS -- Number of terminals.  */
#define YYNTOKENS  135
/* YYNNTS -- Number of nonterminals.  */
#define YYNNTS  154
/* YYNRULES -- Number of rules.  */
#define YYNRULES  368
/* YYNRULES -- Number of states.  */
#define YYNSTATES  611

/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
#define YYUNDEFTOK  2
#define YYMAXUTOK   373

#define YYTRANSLATE(YYX)						\
  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)

/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
static const yytype_uint8 yytranslate[] =
{
       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     132,   133,   119,   117,   134,   118,   127,   120,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,   123,   122,
     124,   116,   125,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,   128,     2,   129,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,   121,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
      45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
      55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
      65,    66,    67,    68,    69,    70,    71,    72,    73,    74,
      75,    76,    77,    78,    79,    80,    81,    82,    83,    84,
      85,    86,    87,    88,    89,    90,    91,    92,    93,    94,
      95,    96,    97,    98,    99,   100,   101,   102,   103,   104,
     105,   106,   107,   108,   109,   110,   111,   112,   113,   114,
     115,   126,   130,   131
};

#if YYDEBUG
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
   YYRHS.  */
static const yytype_uint16 yyprhs[] =
{
       0,     0,     3,     6,     8,    10,    13,    15,    17,    19,
      21,    23,    25,    27,    29,    31,    33,    35,    37,    39,
      41,    43,    45,    47,    49,    51,    53,    55,    57,    59,
      61,    63,    65,    67,    69,    71,    73,    81,    84,    87,
      95,    97,    99,   101,   103,   105,   107,   108,   111,   112,
     116,   117,   128,   130,   131,   135,   137,   141,   142,   144,
     146,   148,   152,   153,   157,   158,   163,   164,   168,   171,
     173,   175,   177,   179,   181,   183,   187,   189,   193,   197,
     199,   201,   203,   205,   207,   210,   214,   219,   221,   223,
     224,   226,   228,   229,   237,   240,   242,   244,   246,   250,
     252,   254,   256,   258,   260,   262,   265,   267,   268,   272,
     279,   284,   290,   292,   293,   296,   297,   308,   313,   317,
     329,   332,   333,   337,   340,   342,   346,   348,   350,   353,
     356,   357,   360,   363,   367,   369,   371,   373,   375,   377,
     384,   386,   387,   394,   396,   398,   400,   402,   404,   406,
     408,   410,   412,   414,   418,   422,   426,   436,   438,   439,
     441,   442,   443,   457,   459,   461,   465,   467,   470,   473,
     477,   479,   481,   483,   485,   487,   489,   490,   493,   496,
     499,   502,   505,   508,   511,   514,   516,   518,   520,   522,
     524,   530,   533,   537,   541,   546,   548,   551,   555,   558,
     559,   561,   563,   565,   567,   569,   571,   577,   582,   587,
     591,   592,   596,   598,   601,   605,   607,   609,   613,   615,
     620,   627,   639,   649,   653,   654,   656,   660,   661,   665,
     666,   668,   672,   675,   678,   681,   684,   687,   689,   691,
     692,   694,   696,   702,   705,   707,   710,   711,   713,   714,
     716,   718,   722,   726,   727,   729,   733,   735,   737,   740,
     741,   744,   745,   749,   751,   755,   758,   760,   763,   764,
     766,   769,   772,   778,   782,   784,   785,   787,   788,   792,
     797,   798,   802,   807,   808,   810,   813,   816,   821,   824,
     826,   829,   833,   837,   841,   845,   849,   853,   857,   860,
     863,   866,   870,   875,   879,   883,   887,   892,   895,   898,
     900,   905,   909,   914,   917,   920,   924,   928,   931,   936,
     943,   944,   946,   950,   954,   958,   960,   964,   968,   972,
     974,   976,   981,   984,   988,   992,   994,   996,  1000,  1002,
    1006,  1008,  1009,  1011,  1013,  1015,  1017,  1019,  1021,  1023,
    1025,  1027,  1029,  1031,  1033,  1035,  1037,  1039,  1041,  1043,
    1045,  1047,  1049,  1051,  1053,  1055,  1057,  1059,  1061
};

/* YYRHS -- A `-1'-separated list of the rules' RHS.  */
static const yytype_int16 yyrhs[] =
{
     136,     0,    -1,   137,   136,    -1,   137,    -1,   138,    -1,
     138,   122,    -1,   139,    -1,   141,    -1,   142,    -1,   148,
      -1,   214,    -1,   156,    -1,   164,    -1,   179,    -1,   216,
      -1,   165,    -1,   168,    -1,   178,    -1,   175,    -1,   208,
      -1,   181,    -1,   185,    -1,   180,    -1,   193,    -1,   191,
      -1,   189,    -1,   197,    -1,   174,    -1,   218,    -1,   200,
      -1,   209,    -1,   210,    -1,   211,    -1,   212,    -1,   213,
      -1,   215,    -1,     9,    93,   269,   240,     5,    25,   140,
      -1,   285,   258,    -1,    23,   268,    -1,    27,   145,   269,
     146,   143,   144,   147,    -1,    94,    -1,    44,    -1,   284,
      -1,    90,    -1,    91,    -1,    19,    -1,    -1,   103,    69,
      -1,    -1,    97,    34,   284,    -1,    -1,    28,    93,   269,
     132,   149,   133,   155,   151,   153,   154,    -1,   150,    -1,
      -1,   150,   134,   140,    -1,   140,    -1,    12,   116,   152,
      -1,    -1,    49,    -1,    58,    -1,    64,    -1,    92,   116,
     284,    -1,    -1,    13,   116,   284,    -1,    -1,    52,   132,
     241,   133,    -1,    -1,    28,   158,   157,    -1,   159,   160,
      -1,    71,    -1,   287,    -1,     7,    -1,   285,    -1,   195,
      -1,   111,    -1,   132,   161,   133,    -1,   162,    -1,   161,
     134,   162,    -1,   159,   116,   163,    -1,   159,    -1,   285,
      -1,   194,    -1,   282,    -1,   284,    -1,    89,   285,    -1,
      38,    93,   241,    -1,    41,   166,   167,   177,    -1,    43,
      -1,    16,    -1,    -1,   283,    -1,     8,    -1,    -1,    46,
     169,    70,   241,    94,   172,   173,    -1,     8,    76,    -1,
       8,    -1,   170,    -1,   171,    -1,   170,   134,   171,    -1,
      87,    -1,    53,    -1,    96,    -1,    33,    -1,    86,    -1,
      77,    -1,    47,   285,    -1,   285,    -1,    -1,   103,    46,
      72,    -1,    84,   169,    70,   241,    44,   172,    -1,    62,
     166,   176,   177,    -1,    62,   166,    94,   283,   177,    -1,
     283,    -1,    -1,    50,   276,    -1,    -1,    28,    51,   274,
      70,   269,    97,   271,   132,   236,   133,    -1,    40,    51,
     274,   250,    -1,   105,   106,   279,    -1,    28,    45,   159,
     183,    83,   163,   182,    14,   284,    57,   284,    -1,   103,
     160,    -1,    -1,   132,   184,   133,    -1,   132,   133,    -1,
     242,    -1,    78,   269,   186,    -1,   187,    -1,   188,    -1,
     187,   188,    -1,   188,   187,    -1,    -1,    17,   277,    -1,
       6,   277,    -1,    38,   190,   276,    -1,     7,    -1,   287,
      -1,    51,    -1,    86,    -1,   101,    -1,    38,    45,   276,
     132,   192,   133,    -1,   242,    -1,    -1,    38,    71,   194,
     132,   196,   133,    -1,   111,    -1,   195,    -1,   117,    -1,
     118,    -1,   119,    -1,   120,    -1,   124,    -1,   125,    -1,
     116,    -1,   276,    -1,   276,   134,   276,    -1,    64,   134,
     276,    -1,   276,   134,    64,    -1,     9,    93,   269,   240,
      80,   199,   198,    94,   276,    -1,   276,    -1,    -1,    25,
      -1,    -1,    -1,    28,    86,   276,    14,   201,    70,   205,
      94,   204,   250,    37,   206,   202,    -1,    66,    -1,   218,
      -1,   128,   203,   129,    -1,   218,    -1,   218,   122,    -1,
     203,   218,    -1,   269,   127,   272,    -1,   269,    -1,    87,
      -1,    96,    -1,    33,    -1,    53,    -1,    54,    -1,    -1,
      67,   269,    -1,    59,   269,    -1,     3,    95,    -1,    18,
      95,    -1,    18,   104,    -1,    26,   104,    -1,    39,    95,
      -1,    85,   104,    -1,     3,    -1,    18,    -1,    26,    -1,
      39,    -1,    85,    -1,    28,   101,   276,    14,   229,    -1,
      60,   278,    -1,    28,    31,   270,    -1,    38,    31,   270,
      -1,    24,   274,    70,   269,    -1,    98,    -1,    98,   269,
      -1,   107,   217,   218,    -1,   103,   242,    -1,    -1,   229,
      -1,   228,    -1,   227,    -1,   219,    -1,   207,    -1,   226,
      -1,    53,    55,   269,   221,   220,    -1,    99,   132,   224,
     133,    -1,    87,   224,   247,   250,    -1,   132,   222,   133,
      -1,    -1,   222,   134,   223,    -1,   223,    -1,   285,   260,
      -1,   224,   134,   225,    -1,   225,    -1,   259,    -1,   269,
     127,   119,    -1,   119,    -1,    33,    44,   269,   250,    -1,
      96,   269,    88,   264,   247,   250,    -1,    32,   276,   145,
      30,    42,    87,   231,   266,   247,   250,   232,    -1,    87,
     231,   266,   230,   247,   250,   243,   246,   232,    -1,    55,
      93,   269,    -1,    -1,    36,    -1,    36,    70,   285,    -1,
      -1,    74,    20,   233,    -1,    -1,   234,    -1,   233,   134,
     234,    -1,   285,   235,    -1,   262,   235,    -1,    97,   111,
      -1,    97,   124,    -1,    97,   125,    -1,    15,    -1,    35,
      -1,    -1,   238,    -1,   237,    -1,   276,   132,   242,   133,
     239,    -1,   272,   239,    -1,   273,    -1,   103,   273,    -1,
      -1,   119,    -1,    -1,   242,    -1,   276,    -1,   242,   134,
     276,    -1,    47,    20,   244,    -1,    -1,   245,    -1,   244,
     134,   245,    -1,   285,    -1,   262,    -1,    48,   259,    -1,
      -1,    44,   248,    -1,    -1,   248,   134,   249,    -1,   249,
      -1,   251,    14,   275,    -1,   251,   275,    -1,   251,    -1,
     102,   259,    -1,    -1,   269,    -1,   269,   119,    -1,   269,
     252,    -1,   128,   253,   134,   254,   129,    -1,   128,   277,
     129,    -1,   277,    -1,    -1,   277,    -1,    -1,   128,   129,
     256,    -1,   128,   283,   129,   256,    -1,    -1,   128,   129,
     256,    -1,   128,   283,   129,   256,    -1,    -1,   276,    -1,
      89,   276,    -1,   257,   255,    -1,   276,   132,   283,   133,
      -1,   262,   260,    -1,   280,    -1,   118,   259,    -1,   259,
     117,   259,    -1,   259,   118,   259,    -1,   259,   120,   259,
      -1,   259,   119,   259,    -1,   259,   124,   259,    -1,   259,
     125,   259,    -1,   259,   116,   259,    -1,   123,   259,    -1,
     122,   259,    -1,   121,   259,    -1,   280,   130,   258,    -1,
      21,   280,    14,   258,    -1,   132,   259,   133,    -1,   259,
     111,   259,    -1,   259,   108,   259,    -1,   259,    65,   108,
     259,    -1,   111,   259,    -1,   259,   111,    -1,   285,    -1,
     276,   132,   119,   133,    -1,   276,   132,   133,    -1,   276,
     132,   261,   133,    -1,   259,    56,    -1,   259,    68,    -1,
     259,    10,   259,    -1,   259,    73,   259,    -1,    65,   259,
      -1,   128,   259,   129,   260,    -1,   128,   259,   123,   259,
     129,   260,    -1,    -1,   259,    -1,   261,   134,   259,    -1,
     269,   127,   263,    -1,   281,   127,   263,    -1,   272,    -1,
     263,   127,   272,    -1,   263,   127,   119,    -1,   264,   134,
     265,    -1,   265,    -1,   119,    -1,   285,   260,   116,   259,
      -1,   262,   260,    -1,   269,   127,   119,    -1,   266,   134,
     267,    -1,   267,    -1,   119,    -1,   259,    14,   285,    -1,
     259,    -1,   269,   127,   119,    -1,   285,    -1,    -1,   286,
      -1,   285,    -1,   285,    -1,   285,    -1,   285,    -1,   285,
      -1,   285,    -1,   285,    -1,   285,    -1,   284,    -1,   284,
      -1,   285,    -1,   283,    -1,   114,    -1,   284,    -1,   281,
      -1,   288,    -1,   113,    -1,   283,    -1,   114,    -1,   112,
      -1,   110,    -1,   109,    -1,    29,    -1,    63,    -1,    79,
      -1,    75,    -1
};

/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
static const yytype_uint16 yyrline[] =
{
       0,   192,   192,   194,   198,   199,   202,   203,   204,   205,
     206,   207,   208,   209,   210,   211,   212,   213,   214,   215,
     216,   217,   218,   219,   220,   221,   222,   223,   224,   225,
     226,   227,   228,   229,   230,   231,   241,   247,   261,   276,
     282,   284,   293,   294,   295,   298,   299,   302,   303,   309,
     310,   321,   328,   329,   333,   335,   340,   341,   344,   345,
     346,   349,   352,   355,   358,   361,   362,   373,   379,   385,
     386,   387,   390,   390,   390,   394,   398,   400,   404,   408,
     414,   415,   416,   417,   418,   431,   445,   451,   452,   453,
     456,   459,   460,   470,   476,   480,   484,   489,   492,   498,
     501,   504,   507,   510,   515,   518,   521,   526,   527,   539,
     552,   556,   562,   563,   566,   567,   581,   595,   608,   631,
     637,   638,   641,   642,   645,   657,   663,   667,   671,   675,
     680,   685,   686,   704,   710,   711,   712,   713,   714,   717,
     723,   724,   727,   733,   733,   735,   736,   737,   738,   739,
     740,   741,   744,   748,   750,   752,   764,   771,   772,   775,
     776,   790,   789,   798,   799,   800,   803,   805,   807,   811,
     815,   822,   823,   824,   825,   828,   829,   841,   847,   867,
     871,   875,   879,   883,   887,   892,   896,   900,   905,   909,
     923,   937,   951,   965,   979,   992,   996,  1009,  1015,  1018,
    1032,  1033,  1034,  1035,  1036,  1037,  1048,  1056,  1063,  1069,
    1070,  1074,  1076,  1080,  1089,  1091,  1096,  1098,  1102,  1119,
    1137,  1159,  1175,  1193,  1196,  1199,  1200,  1201,  1204,  1205,
    1208,  1210,  1214,  1220,  1226,  1227,  1228,  1229,  1230,  1231,
    1235,  1236,  1246,  1252,  1258,  1259,  1260,  1272,  1273,  1276,
    1278,  1280,  1284,  1285,  1288,  1289,  1292,  1298,  1304,  1305,
    1316,  1317,  1320,  1322,  1326,  1332,  1338,  1346,  1347,  1350,
    1358,  1366,  1377,  1383,  1391,  1392,  1395,  1396,  1399,  1401,
    1404,  1407,  1409,  1412,  1415,  1435,  1442,  1448,  1461,  1465,
    1467,  1469,  1471,  1473,  1475,  1477,  1479,  1481,  1483,  1485,
    1487,  1489,  1493,  1497,  1499,  1501,  1503,  1505,  1507,  1509,
    1515,  1519,  1523,  1527,  1529,  1531,  1533,  1535,  1539,  1546,
    1554,  1557,  1559,  1563,  1569,  1575,  1577,  1579,  1590,  1592,
    1594,  1606,  1610,  1614,  1631,  1633,  1635,  1648,  1655,  1661,
    1672,  1673,  1676,  1681,  1693,  1694,  1695,  1696,  1697,  1698,
    1699,  1701,  1702,  1703,  1705,  1712,  1719,  1726,  1728,  1736,
    1742,  1743,  1746,  1747,  1749,  1751,  1758,  1767,  1768
};
#endif

#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
static const char *const yytname[] =
{
  "$end", "error", "$undefined", "ABORT_TRANS", "ACL", "ADD", "AFTER",
  "AGGREGATE", "ALL", "ALTER", "AND", "APPEND", "ARCHIVE", "ARCH_STORE",
  "AS", "ASC", "BACKWARD", "BEFORE", "BEGIN_TRANS", "BINARY", "BY", "CAST",
  "CHANGE", "CLOSE", "CLUSTER", "COLUMN", "COMMIT", "COPY", "CREATE",
  "CURRENT", "CURSOR", "DATABASE", "DECLARE", "DELETE", "DELIMITERS",
  "DESC", "DISTINCT", "DO", "DROP", "END_TRANS", "EXTEND", "FETCH", "FOR",
  "FORWARD", "FROM", "FUNCTION", "GRANT", "GROUP", "HAVING", "HEAVY", "IN",
  "INDEX", "INHERITS", "INSERT", "INSTEAD", "INTO", "ISNULL", "LANGUAGE",
  "LIGHT", "LISTEN", "LOAD", "MERGE", "MOVE", "NEW", "NONE", "NOT",
  "NOTHING", "NOTIFY", "NOTNULL", "OIDS", "ON", "OPERATOR", "OPTION", "OR",
  "ORDER", "PNULL", "PRIVILEGES", "PUBLIC", "PURGE", "P_TYPE", "RENAME",
  "REPLACE", "RETRIEVE", "RETURNS", "REVOKE", "ROLLBACK", "RULE", "SELECT",
  "SET", "SETOF", "STDIN", "STDOUT", "STORE", "TABLE", "TO", "TRANSACTION",
  "UPDATE", "USING", "VACUUM", "VALUES", "VERSION", "VIEW", "WHERE",
  "WITH", "WORK", "EXECUTE", "RECIPE", "EXPLAIN", "LIKE", "IDENT",
  "SCONST", "Op", "ICONST", "PARAM", "FCONST", "OP", "'='", "'+'", "'-'",
  "'*'", "'/'", "'|'", "';'", "':'", "'<'", "'>'", "UMINUS", "'.'", "'['",
  "']'", "TYPECAST", "REDUCE", "'('", "')'", "','", "$accept",
  "queryblock", "query", "stmt", "add_attr_stmt", "columnDef",
  "close_portal_stmt", "copy_stmt", "copy_dirn", "copy_file_name",
  "opt_binary", "opt_with_copy", "copy_delimiter", "create_stmt",
  "opt_table_element_list", "table_element_list", "opt_archive_type",
  "archive_type", "opt_location", "opt_archive_location", "opt_inherit",
  "define_stmt", "def_rest", "def_type", "def_name", "definition",
  "def_list", "def_elem", "def_arg", "destroy_stmt", "fetch_stmt",
  "opt_direction", "fetch_how_many", "grant_stmt", "privileges",
  "operation_commalist", "operation", "grantee", "opt_with_grant",
  "revoke_stmt", "mve_stmt", "opt_move_where", "opt_portal_name",
  "index_stmt", "extend_stmt", "recipe_stmt", "procedure_stmt",
  "opt_with_func", "def_args", "def_name_list", "purge_stmt",
  "purge_quals", "before_clause", "after_clause", "remove_stmt",
  "remove_type", "remove_func_stmt", "func_argtypes", "remove_oper_stmt",
  "all_Op", "math_op", "oper_argtypes", "rename_stmt", "opt_name",
  "opt_column", "rule_stmt", "$@1", "opt_stmt_list", "opt_stmt_block",
  "event_object", "event", "opt_instead", "notify_stmt", "listen_stmt",
  "transaction_stmt", "view_stmt", "load_stmt", "create_db_stmt",
  "destroy_db_stmt", "cluster_stmt", "vacuum_stmt", "explain_stmt",
  "explain_options", "optimizable_stmt", "insert_stmt", "insert_rest",
  "opt_column_list", "columnList", "column_elem", "expr_list2",
  "expr_elem", "delet_stmt", "update_stmt", "cursor_stmt", "select_stmt",
  "result", "opt_unique", "sort_clause", "sortby_list", "sortby",
  "opt_use_op", "index_params", "func_index", "index_elem", "opt_class",
  "opt_inh_star", "relation_name_list", "name_list", "group_clause",
  "groupby_list", "groupby", "having_clause", "from_clause", "from_list",
  "from_val", "where_clause", "relation_expr", "time_range",
  "opt_range_start", "opt_range_end", "opt_array_bounds",
  "nest_array_bounds", "typname", "type_name", "a_expr", "opt_indirection",
  "expr_list", "attr", "attrs", "res_target_list", "res_target_el",
  "res_target_list2", "res_target_el2", "opt_id", "relation_name",
  "database_name", "access_method", "attr_name", "class", "index_name",
  "var_name", "name", "date", "file_name", "recipe_name", "a_expr_const",
  "param_no", "num_const", "iconst", "sconst", "Id",
  "special_rule_relation", "Type", "Pnull", 0
};
#endif

# ifdef YYPRINT
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
   token YYLEX-NUM.  */
static const yytype_uint16 yytoknum[] =
{
       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
     265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
     275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
     285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
     295,   296,   297,   298,   299,   300,   301,   302,   303,   304,
     305,   306,   307,   308,   309,   310,   311,   312,   313,   314,
     315,   316,   317,   318,   319,   320,   321,   322,   323,   324,
     325,   326,   327,   328,   329,   330,   331,   332,   333,   334,
     335,   336,   337,   338,   339,   340,   341,   342,   343,   344,
     345,   346,   347,   348,   349,   350,   351,   352,   353,   354,
     355,   356,   357,   358,   359,   360,   361,   362,   363,   364,
     365,   366,   367,   368,   369,   370,    61,    43,    45,    42,
      47,   124,    59,    58,    60,    62,   371,    46,    91,    93,
     372,   373,    40,    41,    44
};
# endif

/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
static const yytype_uint16 yyr1[] =
{
       0,   135,   136,   136,   137,   137,   138,   138,   138,   138,
     138,   138,   138,   138,   138,   138,   138,   138,   138,   138,
     138,   138,   138,   138,   138,   138,   138,   138,   138,   138,
     138,   138,   138,   138,   138,   138,   139,   140,   141,   142,
     143,   143,   144,   144,   144,   145,   145,   146,   146,   147,
     147,   148,   149,   149,   150,   150,   151,   151,   152,   152,
     152,   153,   153,   154,   154,   155,   155,   156,   157,   158,
     158,   158,   159,   159,   159,   160,   161,   161,   162,   162,
     163,   163,   163,   163,   163,   164,   165,   166,   166,   166,
     167,   167,   167,   168,   169,   169,   169,   170,   170,   171,
     171,   171,   171,   171,   172,   172,   172,   173,   173,   174,
     175,   175,   176,   176,   177,   177,   178,   179,   180,   181,
     182,   182,   183,   183,   184,   185,   186,   186,   186,   186,
     186,   187,   188,   189,   190,   190,   190,   190,   190,   191,
     192,   192,   193,   194,   194,   195,   195,   195,   195,   195,
     195,   195,   196,   196,   196,   196,   197,   198,   198,   199,
     199,   201,   200,   202,   202,   202,   203,   203,   203,   204,
     204,   205,   205,   205,   205,   206,   206,   207,   208,   209,
     209,   209,   209,   209,   209,   209,   209,   209,   209,   209,
     210,   211,   212,   213,   214,   215,   215,   216,   217,   217,
     218,   218,   218,   218,   218,   218,   219,   220,   220,   221,
     221,   222,   222,   223,   224,   224,   225,   225,   225,   226,
     227,   228,   229,   230,   230,   231,   231,   231,   232,   232,
     233,   233,   234,   234,   235,   235,   235,   235,   235,   235,
     236,   236,   237,   238,   239,   239,   239,   240,   240,   241,
     242,   242,   243,   243,   244,   244,   245,   245,   246,   246,
     247,   247,   248,   248,   249,   249,   249,   250,   250,   251,
     251,   251,   252,   252,   253,   253,   254,   254,   255,   255,
     255,   256,   256,   256,   257,   257,   258,   258,   259,   259,
     259,   259,   259,   259,   259,   259,   259,   259,   259,   259,
     259,   259,   259,   259,   259,   259,   259,   259,   259,   259,
     259,   259,   259,   259,   259,   259,   259,   259,   260,   260,
     260,   261,   261,   262,   262,   263,   263,   263,   264,   264,
     264,   265,   265,   265,   266,   266,   266,   267,   267,   267,
     268,   268,   269,   269,   270,   271,   272,   273,   274,   275,
     276,   277,   278,   279,   280,   280,   280,   280,   280,   281,
     282,   282,   283,   284,   285,   286,   286,   287,   288
};

/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
static const yytype_uint8 yyr2[] =
{
       0,     2,     2,     1,     1,     2,     1,     1,     1,     1,
       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
       1,     1,     1,     1,     1,     1,     7,     2,     2,     7,
       1,     1,     1,     1,     1,     1,     0,     2,     0,     3,
       0,    10,     1,     0,     3,     1,     3,     0,     1,     1,
       1,     3,     0,     3,     0,     4,     0,     3,     2,     1,
       1,     1,     1,     1,     1,     3,     1,     3,     3,     1,
       1,     1,     1,     1,     2,     3,     4,     1,     1,     0,
       1,     1,     0,     7,     2,     1,     1,     1,     3,     1,
       1,     1,     1,     1,     1,     2,     1,     0,     3,     6,
       4,     5,     1,     0,     2,     0,    10,     4,     3,    11,
       2,     0,     3,     2,     1,     3,     1,     1,     2,     2,
       0,     2,     2,     3,     1,     1,     1,     1,     1,     6,
       1,     0,     6,     1,     1,     1,     1,     1,     1,     1,
       1,     1,     1,     3,     3,     3,     9,     1,     0,     1,
       0,     0,    13,     1,     1,     3,     1,     2,     2,     3,
       1,     1,     1,     1,     1,     1,     0,     2,     2,     2,
       2,     2,     2,     2,     2,     1,     1,     1,     1,     1,
       5,     2,     3,     3,     4,     1,     2,     3,     2,     0,
       1,     1,     1,     1,     1,     1,     5,     4,     4,     3,
       0,     3,     1,     2,     3,     1,     1,     3,     1,     4,
       6,    11,     9,     3,     0,     1,     3,     0,     3,     0,
       1,     3,     2,     2,     2,     2,     2,     1,     1,     0,
       1,     1,     5,     2,     1,     2,     0,     1,     0,     1,
       1,     3,     3,     0,     1,     3,     1,     1,     2,     0,
       2,     0,     3,     1,     3,     2,     1,     2,     0,     1,
       2,     2,     5,     3,     1,     0,     1,     0,     3,     4,
       0,     3,     4,     0,     1,     2,     2,     4,     2,     1,
       2,     3,     3,     3,     3,     3,     3,     3,     2,     2,
       2,     3,     4,     3,     3,     3,     4,     2,     2,     1,
       4,     3,     4,     2,     2,     3,     3,     2,     4,     6,
       0,     1,     3,     3,     3,     1,     3,     3,     3,     1,
       1,     4,     2,     3,     3,     1,     1,     3,     1,     3,
       1,     0,     1,     1,     1,     1,     1,     1,     1,     1,
       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
       1,     1,     1,     1,     1,     1,     1,     1,     1
};

/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
   means the default is an error.  */
static const yytype_uint16 yydefact[] =
{
       0,   185,     0,   186,   341,     0,   187,    46,     0,     0,
       0,     0,   188,     0,    89,     0,     0,     0,     0,    89,
       0,     0,     0,   189,   227,     0,   195,     0,   199,     0,
       3,     4,     6,     7,     8,     9,    11,    12,    15,    16,
      27,    18,    17,    13,    22,    20,    21,    25,    24,    23,
      26,    29,   204,    19,    30,    31,    32,    33,    34,    10,
      35,    14,    28,   203,   205,   202,   201,   200,   179,     0,
     180,   181,   364,    38,   340,     0,   348,   182,    45,     0,
      71,     0,     0,     0,    69,   367,     0,     0,     0,     0,
      70,    46,   350,     0,   134,     0,     0,   136,     0,   137,
       0,   138,     0,   135,   183,     0,    88,    87,    92,    95,
     102,   100,   103,    99,   101,     0,    96,    97,     0,   365,
     366,   178,   343,   342,   363,   191,   352,   113,   177,   130,
       0,   184,   225,     0,     0,   196,     0,     0,     0,     1,
       2,     5,   248,     0,    48,   192,   344,    74,   151,   145,
     146,   147,   148,   149,   150,     0,    73,    72,     0,     0,
       0,     0,    67,     0,     0,   268,   193,     0,   143,     0,
     144,    85,   249,   250,   133,   268,    91,   362,   115,    90,
      94,     0,     0,   210,     0,   115,   112,     0,     0,   125,
     126,   127,     0,     0,     0,     0,   368,     0,   359,   355,
       0,   336,     0,     0,     0,     0,   338,   320,   224,   335,
       0,     0,   289,   357,   354,   356,   309,   358,     0,   118,
     353,   198,   197,   247,     0,   194,     0,     0,     0,     0,
       0,   161,    53,     0,     0,    68,     0,     0,   219,   141,
       0,     0,   117,     0,    86,     0,    98,     0,     0,   115,
     110,   132,   351,   131,   128,   129,     0,   226,     0,   357,
     317,     0,   307,   290,   300,   299,   298,     0,     0,     0,
     313,     0,   314,     0,     0,   308,     0,     0,     0,     0,
       0,     0,     0,     0,   288,     0,     0,   261,     0,     0,
       0,     0,   330,   320,   261,   329,     0,     0,   320,     0,
     160,    47,    41,    40,     0,   123,     0,   124,     0,     0,
       0,    55,     0,    52,     0,   190,    79,     0,    76,     0,
     267,     0,   140,     0,     0,   152,   251,   114,     0,     0,
     212,   320,     0,     0,   206,   111,     0,     0,     0,   303,
     315,   337,     0,   316,   305,   304,   297,   291,   292,   294,
     293,   295,   296,     0,     0,   334,     0,   268,   339,   323,
     325,   346,     0,   311,   321,     0,     0,   280,   301,   284,
     324,   332,     0,   268,     0,     0,     0,   159,   158,    43,
      44,    50,    42,   122,     0,   361,   121,    81,    82,   360,
      83,    80,     0,     0,    66,     0,    37,     0,    75,     0,
     227,   139,     0,   142,     0,     0,   104,   107,   106,   209,
       0,   213,   218,   261,   215,   216,     0,     0,   109,   302,
     306,     0,   320,   223,   260,   263,   266,   269,   253,     0,
     310,   312,     0,   285,     0,   286,     0,   328,   220,   333,
       0,    36,     0,   157,     0,    39,    84,     0,     0,     0,
     345,   173,   174,   171,   172,     0,     0,    57,    54,    78,
      77,     0,   154,   155,   153,   105,     0,    93,   211,     0,
     268,     0,     0,     0,   318,     0,     0,   265,   349,   270,
     275,   271,     0,   259,   327,   326,   322,   283,     0,     0,
     331,     0,     0,   120,     0,     0,     0,     0,     0,    62,
     261,     0,   214,   208,   217,   207,   320,   262,   264,     0,
     274,     0,     0,   229,     0,   278,   283,   287,   156,    49,
       0,     0,   241,   240,   246,     0,   346,   268,   170,     0,
       0,     0,    64,   268,   108,   319,   277,   273,   252,   254,
     257,   256,   258,     0,   222,   283,     0,   279,     0,   116,
       0,   243,   244,   347,     0,     0,     0,    65,    58,    59,
      60,    56,     0,     0,    51,   229,     0,   276,     0,     0,
     281,   283,   119,   245,     0,   176,   169,    61,     0,   221,
     272,   255,   228,   230,   239,   239,   282,   246,   175,     0,
      63,     0,   237,   238,     0,   233,   232,   242,   163,     0,
     162,   164,   231,   234,   235,   236,     0,   166,   165,   168,
     167
};

/* YYDEFGOTO[NTERM-NUM].  */
static const yytype_int16 yydefgoto[] =
{
      -1,    29,    30,    31,    32,   311,    33,    34,   304,   381,
      79,   227,   445,    35,   312,   313,   499,   561,   532,   564,
     457,    36,   162,    89,   316,   235,   317,   318,   386,    37,
      38,   108,   178,    39,   115,   116,   117,   407,   467,    40,
      41,   185,   244,    42,    43,    44,    45,   448,   229,   306,
      46,   189,   190,   191,    47,   102,    48,   321,    49,   387,
     156,   324,    50,   442,   378,    51,   310,   600,   606,   527,
     455,   589,    52,    53,    54,    55,    56,    57,    58,    59,
      60,    61,   138,    62,    63,   334,   248,   329,   330,   413,
     414,    64,    65,    66,    67,   287,   133,   544,   582,   583,
     595,   521,   522,   523,   551,   224,   171,   172,   483,   538,
     539,   513,   357,   424,   425,   238,   426,   481,   509,   566,
     435,   515,   367,   368,   206,   284,   365,   207,   359,   294,
     295,   208,   209,    73,   261,   145,   449,   360,   552,    75,
     477,   211,   251,   125,   219,   212,   213,   388,   214,   215,
     216,   123,    90,   217
};

/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
   STATE-NUM.  */
#define YYPACT_NINF -437
static const yytype_int16 yypact[] =
{
     856,   -47,   -48,    99,    36,    36,    19,   133,   452,    36,
     123,   874,    76,   127,    14,    97,   144,     4,   115,    14,
       4,     4,    97,   130,   195,     4,     4,   156,   139,   250,
     856,   142,  -437,  -437,  -437,  -437,  -437,  -437,  -437,  -437,
    -437,  -437,  -437,  -437,  -437,  -437,  -437,  -437,  -437,  -437,
    -437,  -437,  -437,  -437,  -437,  -437,  -437,  -437,  -437,  -437,
    -437,  -437,  -437,  -437,  -437,  -437,  -437,  -437,  -437,     4,
    -437,  -437,  -437,  -437,  -437,   200,  -437,  -437,  -437,     4,
    -437,    36,   905,    36,  -437,  -437,    36,     4,    36,   905,
    -437,   133,  -437,     4,  -437,    36,    36,  -437,   450,  -437,
      36,  -437,    36,  -437,  -437,    36,  -437,  -437,     3,   209,
    -437,  -437,  -437,  -437,  -437,   230,   169,  -437,     4,  -437,
    -437,  -437,  -437,  -437,  -437,  -437,  -437,   -50,  -437,    91,
     241,  -437,   243,   715,   221,  -437,    36,    36,   235,  -437,
    -437,  -437,   196,     4,   211,  -437,  -437,  -437,  -437,  -437,
    -437,  -437,  -437,  -437,  -437,   184,  -437,  -437,   247,   306,
     189,   311,  -437,   197,   297,   226,  -437,   198,  -437,   205,
    -437,  -437,   206,  -437,  -437,   226,  -437,  -437,   291,  -437,
    -437,    36,    94,   210,   231,   291,  -437,   115,   115,  -437,
     338,   328,    36,    36,   -40,   467,  -437,   467,  -437,  -437,
     467,  -437,   467,   467,   467,   467,   393,   218,   -35,  -437,
     220,   217,   223,   224,  -437,  -437,   106,  -437,    -2,  -437,
    -437,   206,  -437,  -437,    20,  -437,   286,    -7,   -73,   274,
       4,  -437,    36,   271,   905,  -437,   324,   467,  -437,    36,
     -21,    36,  -437,    36,  -437,   270,  -437,    36,    50,   291,
    -437,  -437,  -437,  -437,  -437,  -437,   325,  -437,   357,  -437,
     861,   246,   876,  -437,   116,   116,   116,   136,   467,    36,
    -437,   268,  -437,   467,   467,    47,   467,   467,   467,   467,
     467,   467,   467,   467,  -437,   284,   467,   335,    44,   687,
      73,    36,  -437,   218,   -18,  -437,   256,   224,   121,   359,
     360,  -437,  -437,  -437,    64,  -437,   253,   206,   893,   295,
     329,  -437,   261,   275,    73,  -437,   288,   143,  -437,   315,
     610,   278,   206,   281,   279,   283,  -437,  -437,    -6,   147,
    -437,   218,   739,   276,  -437,  -437,    -6,    73,    36,  -437,
     861,  -437,   467,   629,   831,   876,   322,   154,   154,   116,
     116,   158,   158,   530,     4,  -437,     4,   226,  -437,   293,
    -437,  -437,   285,  -437,   610,   157,    36,   296,  -437,   294,
     293,  -437,    27,   226,    66,   307,    36,  -437,    36,  -437,
    -437,   330,  -437,  -437,    36,  -437,   326,  -437,  -437,  -437,
    -437,  -437,    36,   111,   376,    36,  -437,   893,  -437,   905,
     195,  -437,    36,  -437,    29,    36,  -437,   332,  -437,  -437,
      36,  -437,  -437,   -16,  -437,   610,   304,   739,  -437,  -437,
     831,   467,   218,  -437,   298,  -437,    10,    67,   390,   104,
    -437,  -437,   467,  -437,   -78,  -437,   231,  -437,  -437,  -437,
     467,  -437,   349,  -437,   410,  -437,  -437,   197,   431,   316,
    -437,  -437,  -437,  -437,  -437,   358,   319,   442,  -437,  -437,
    -437,   715,  -437,  -437,  -437,  -437,   409,  -437,  -437,   739,
     226,   110,   161,   595,  -437,     4,    36,  -437,  -437,  -437,
     115,  -437,   436,   412,  -437,  -437,   610,   334,   339,   331,
     610,    36,   115,  -437,   115,    36,     4,    36,   353,   381,
     -13,   402,  -437,  -437,  -437,  -437,   218,  -437,  -437,   341,
     347,    27,   467,   404,   -74,  -437,   334,  -437,  -437,  -437,
     423,   348,  -437,  -437,    88,   350,   352,   226,   362,   366,
     138,   369,   477,   226,  -437,  -437,   115,  -437,   361,  -437,
    -437,   373,   610,   485,  -437,   334,   377,  -437,   115,  -437,
      36,  -437,  -437,  -437,    36,   478,    36,  -437,  -437,  -437,
    -437,  -437,   115,   398,  -437,   404,   387,  -437,    27,    27,
    -437,   334,  -437,  -437,   163,   465,  -437,  -437,   115,  -437,
    -437,  -437,   391,  -437,    34,    -3,  -437,    88,  -437,   239,
    -437,    27,  -437,  -437,   134,  -437,  -437,  -437,  -437,   235,
    -437,  -437,  -437,  -437,  -437,  -437,   179,   405,  -437,  -437,
    -437
};

/* YYPGOTO[NTERM-NUM].  */
static const yytype_int16 yypgoto[] =
{
    -437,   496,  -437,  -437,  -437,  -329,  -437,  -437,  -437,  -437,
     437,  -437,  -437,  -437,  -437,  -437,  -437,  -437,  -437,  -437,
    -437,  -437,  -437,  -437,    52,    87,  -437,   137,   140,  -437,
    -437,   516,  -437,  -437,   517,  -437,   378,   207,  -437,  -437,
    -437,  -437,  -145,  -437,  -437,  -437,  -437,  -437,  -437,  -437,
    -437,  -437,   364,   351,  -437,  -437,  -437,  -437,  -437,   446,
     -90,  -437,  -437,  -437,  -437,  -437,  -437,  -437,  -437,  -437,
    -437,  -437,  -437,  -437,  -437,  -437,  -437,  -437,  -437,  -437,
    -437,  -437,  -437,  -136,  -437,  -437,  -437,  -437,   152,   131,
     102,  -437,  -437,  -437,   340,  -437,   172,    17,  -437,     1,
      -1,  -437,  -437,  -437,     6,  -437,  -174,  -133,  -437,  -437,
      26,  -437,  -285,  -437,   122,  -152,  -437,  -437,  -437,  -437,
    -437,  -436,  -437,  -189,   354,  -279,  -437,  -172,   305,  -437,
     228,   141,   318,  -437,    33,   506,  -437,  -414,    56,   -41,
     132,   120,  -182,  -437,  -437,   413,  -155,  -437,   -98,   -15,
      -4,  -437,   598,  -437
};

/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
   positive, shift that token.  If negative, reduce the rule which
   number is the opposite.  If zero, do what YYDEFACT says.
   If YYTABLE_NINF, syntax error.  */
#define YYTABLE_NINF -351
static const yytype_int16 yytable[] =
{
      74,    76,   222,   126,   221,    92,   253,   245,   170,   373,
     179,   176,   592,   122,   371,   485,   122,   122,   256,   375,
     285,   122,   122,   242,   476,   299,   356,   119,   356,   186,
     106,   356,   593,   119,   177,   196,    72,   302,   177,   259,
     250,   405,   158,   323,   184,    69,   293,   441,    68,   592,
     121,   487,   411,   128,   129,   545,   119,   107,   134,   135,
     305,   120,   177,   297,   175,   122,   458,   120,   194,   593,
     124,   406,   177,   198,   199,   122,   119,   146,   157,    76,
     547,   524,    92,   122,    92,   157,   249,   303,    72,   122,
     120,   146,    92,   463,   594,   307,    92,   187,    92,   286,
     300,    76,   142,    72,   335,   109,   322,    72,   188,   570,
     120,   198,   144,    72,   122,   177,   372,   292,   469,    72,
     160,   286,   196,    77,  -343,   396,   165,   110,   470,    91,
     110,   594,   220,    92,   155,   586,    72,   332,    72,   122,
     198,   163,   576,   474,   451,    72,   268,   111,   419,   333,
     111,   183,    78,    72,   379,   380,    72,   124,  -351,   177,
     198,   199,   366,   358,   452,   200,   210,    93,   202,   203,
     204,   104,   252,   252,   124,    72,   225,    92,   105,   205,
     112,   113,    72,   112,   113,   439,   479,   558,    92,   257,
     114,   550,   270,   114,    70,   480,   559,    72,   453,   118,
     293,   271,   560,    71,   272,   428,   159,   454,   161,   273,
     389,     9,    10,    72,   298,   533,   167,   297,   170,    72,
     173,   438,   174,   484,    92,   124,   122,   535,   314,   504,
     157,   132,    16,  -343,   131,    92,    92,    92,  -350,    92,
     281,   282,   137,   331,   274,   603,    20,   275,  -343,   283,
     139,   296,   276,   277,   278,   279,   280,   173,   604,   605,
     281,   282,   136,   309,   141,   341,    24,     9,    10,   339,
     143,     9,    10,   279,   280,    25,   398,   399,   281,   282,
     409,   410,  -351,  -351,   361,   180,    92,   361,    16,   382,
     431,   432,    16,   390,   505,   469,   587,   241,   510,   389,
     181,   173,    20,   182,   391,   598,    20,   170,   608,   218,
      92,   192,   173,   193,   226,   223,   228,   230,   503,   210,
     231,   232,    24,   529,   408,   233,    24,   236,   237,   234,
     239,    25,   408,    92,   361,    25,   488,   240,   489,   540,
     241,   243,   247,   177,   187,   188,   283,   288,   173,   289,
     122,   291,   122,   290,   567,   301,   297,   308,    24,   173,
     325,   326,    92,   327,   328,   416,   319,   599,   298,   336,
     361,   337,   314,   338,    92,   555,   342,   354,   270,   356,
     446,   565,   390,   374,   376,   377,   383,   423,   450,   427,
     272,   314,   392,   391,   394,   157,   540,   584,    92,   393,
      92,   465,   400,   268,   397,   296,   331,   269,   417,   395,
     369,   401,   403,   297,   297,   402,   546,   404,   430,   584,
     429,   574,   478,   440,   434,   361,   436,   444,   456,   447,
     274,   471,   475,   275,   369,   466,   297,   482,   276,   277,
     278,   279,   280,   491,   492,   494,   281,   282,   495,   270,
     416,   497,   496,   601,   498,   501,   511,   369,   271,    80,
     512,   272,   514,   607,   517,   252,   273,   361,   516,   530,
     609,   122,   478,   531,   534,   536,   537,   519,   543,   520,
     548,   549,   554,    81,  -350,   562,   433,    92,   194,   556,
     563,   526,   122,    92,   210,   568,   119,    82,   443,   557,
    -343,   274,   416,    83,   275,   569,   571,   541,   427,   276,
     277,   278,   279,   280,   578,   575,   580,   281,   282,   588,
     553,   252,   462,    84,   464,   591,   140,   610,   164,   528,
     120,    85,   195,   572,   493,   127,   460,   459,    86,   130,
     268,   254,   196,   418,   169,    87,   553,   577,   472,   260,
      92,   262,   361,    88,   263,   255,   264,   265,   266,   267,
     246,   168,   468,   590,   541,   585,   148,   149,   150,   151,
     152,   502,   461,   315,   153,   154,    72,   124,   197,   177,
     198,   199,   579,   553,   596,   200,   270,   585,   202,   203,
     204,   320,   602,   597,   581,   271,   370,   507,   272,   205,
     437,   166,   500,   273,   355,   268,   573,   258,   508,   103,
       0,   518,     0,     0,     0,   525,     0,   173,     0,     0,
     268,     0,   340,     0,     0,     0,     0,   343,   344,   345,
     346,   347,   348,   349,   350,   351,   352,   353,   274,   268,
       0,   275,     0,   364,     0,     0,   276,   277,   278,   279,
     280,   270,     0,   421,   281,   282,     0,     0,     0,   422,
     271,     0,     0,   272,     0,     0,   270,     0,   273,     0,
       0,     0,     0,     0,   173,   271,     0,     0,   272,     0,
       0,     0,     0,   273,     0,   270,   415,     0,     0,     0,
       0,     0,     0,     0,   271,     0,   420,   272,     0,     0,
       0,     0,     0,   274,     0,     0,   275,     0,   194,     0,
       0,   276,   277,   278,   279,   280,   119,     0,   274,   281,
     282,   275,     0,     0,   506,     0,   276,   277,   278,   279,
     280,     0,     0,     0,   281,   282,   194,   274,     0,     0,
     275,     0,     0,     0,   119,   276,   277,   278,   279,   280,
     120,     0,   195,   281,   282,     0,     0,     0,     0,     0,
     194,     0,   196,     0,     0,     0,     0,     0,   119,     0,
       0,   415,     0,     0,     0,   473,     0,     0,   120,     0,
     195,     0,     0,     0,     0,     0,   486,     0,     0,     0,
     196,     0,     0,     0,   490,     0,    72,   124,   197,   177,
     198,   199,   120,     0,   195,   200,   362,     0,   202,   203,
     204,     0,     0,     0,   196,     0,     0,     0,     0,   205,
     363,     0,     0,   415,    72,   124,   197,   177,   198,   199,
       0,     0,     0,   200,   201,     0,   202,   203,   204,     0,
       0,     0,     0,     0,     0,     0,     0,   205,    72,   124,
     197,   177,   198,   199,     0,     0,     0,   200,   412,     1,
     202,   203,   204,     0,     0,     2,   542,     0,     0,     0,
       0,   205,     0,     0,     3,     0,     0,     0,     0,     4,
       5,    94,     6,     7,     8,     0,     0,   270,     9,    10,
       0,     0,     0,     0,    11,    12,    13,    14,     0,   272,
       0,     0,    15,     0,     0,    95,     0,     0,     0,    16,
       0,     0,     0,     0,     0,    17,    18,   270,    19,    96,
       0,     0,     0,    20,     0,    97,   271,     0,     0,   272,
       0,     0,   270,     0,    21,     0,     0,     0,     0,  -351,
      22,    23,   275,    24,   272,    98,     0,     0,   277,   278,
     279,   280,    25,    85,    26,   281,   282,     0,     0,     0,
      99,    27,     0,    28,     0,     0,     0,   100,     0,   274,
       0,     0,   275,     0,     0,   101,     0,   276,   277,   278,
     279,   280,   384,     0,     0,   281,   282,  -351,     0,     0,
       0,     0,     0,   277,   278,   279,   280,     0,     0,     0,
     281,   282,    72,   124,   168,   177,     0,   385,     0,   148,
     149,   150,   151,   152,    72,     0,   147,   153,   154,     0,
       0,   148,   149,   150,   151,   152,     0,     0,     0,   153,
     154
};

static const yytype_int16 yycheck[] =
{
       4,     5,   138,    18,   137,     9,   188,   181,    98,   294,
     108,     8,    15,    17,   293,   429,    20,    21,   192,   298,
      55,    25,    26,   175,    14,     5,    44,    29,    44,   127,
      16,    44,    35,    29,   112,    75,   109,    44,   112,   194,
     185,    47,    83,    64,    94,    93,   218,   376,    95,    15,
      17,   129,   331,    20,    21,   129,    29,    43,    25,    26,
     133,    63,   112,   218,   105,    69,   395,    63,    21,    35,
     110,    77,   112,   113,   114,    79,    29,    81,    82,    83,
     516,   495,    86,    87,    88,    89,   184,    94,   109,    93,
      63,    95,    96,    64,    97,   228,   100,     6,   102,   134,
      80,   105,    69,   109,   249,     8,   239,   109,    17,   545,
      63,   113,    79,   109,   118,   112,   134,   119,   134,   109,
      87,   134,    75,   104,   127,   314,    93,    33,   413,     9,
      33,    97,   136,   137,    82,   571,   109,    87,   109,   143,
     113,    89,   556,   422,    33,   109,    10,    53,   337,    99,
      53,   118,    19,   109,    90,    91,   109,   110,   111,   112,
     113,   114,    89,   119,    53,   118,   133,    44,   121,   122,
     123,    95,   187,   188,   110,   109,   143,   181,    51,   132,
      86,    87,   109,    86,    87,   119,   119,    49,   192,   193,
      96,   103,    56,    96,    95,   128,    58,   109,    87,    55,
     372,    65,    64,   104,    68,   357,    86,    96,    88,    73,
     308,    32,    33,   109,   218,   500,    96,   372,   308,   109,
     100,   373,   102,   119,   228,   110,   230,   506,   232,   119,
     234,    36,    53,   127,   104,   239,   240,   241,   132,   243,
     124,   125,   103,   247,   108,   111,    67,   111,   127,   128,
       0,   218,   116,   117,   118,   119,   120,   137,   124,   125,
     124,   125,   106,   230,   122,   269,    87,    32,    33,   133,
      70,    32,    33,   119,   120,    96,   133,   134,   124,   125,
     133,   134,   124,   125,   288,    76,   290,   291,    53,   304,
     133,   134,    53,   308,   133,   134,   133,   134,   480,   397,
      70,   181,    67,   134,   308,    66,    67,   397,   129,    88,
     314,    70,   192,    70,   103,   119,   132,    70,   470,   286,
      14,   132,    87,   497,   328,    14,    87,    30,   102,   132,
     132,    96,   336,   337,   338,    96,   434,   132,   436,   511,
     134,    50,   132,   112,     6,    17,   128,   127,   228,   132,
     354,   127,   356,   130,   536,    69,   511,    83,    87,   239,
     240,   241,   366,   243,    94,   332,    42,   128,   372,    44,
     374,    14,   376,   127,   378,   527,   108,    93,    56,    44,
     384,   533,   397,   127,    25,    25,   133,   354,   392,   356,
      68,   395,    97,   397,   133,   399,   568,   569,   402,    70,
     404,   405,    87,    10,   116,   372,   410,    14,   132,   134,
     290,   133,   133,   568,   569,   134,   514,   134,   133,   591,
     127,   554,   426,   116,   128,   429,   132,    97,    52,   103,
     108,   127,   134,   111,   314,   103,   591,    47,   116,   117,
     118,   119,   120,    94,    34,    14,   124,   125,   132,    56,
     417,   132,    94,   589,    12,    46,    20,   337,    65,     7,
      48,    68,   128,   599,   133,   480,    73,   471,   129,   116,
     606,   475,   476,    92,    72,   134,   129,   492,    74,   494,
      57,   133,   132,    31,   132,   116,   366,   491,    21,   127,
      13,   495,   496,   497,   461,   134,    29,    45,   378,   133,
     127,   108,   469,    51,   111,    20,   129,   511,   475,   116,
     117,   118,   119,   120,   116,    37,   129,   124,   125,    54,
     524,   536,   402,    71,   404,   134,    30,   122,    91,   496,
      63,    79,    65,   548,   447,    19,   399,   397,    86,    22,
      10,   190,    75,   336,    98,    93,   550,   562,   417,   195,
     554,   197,   556,   101,   200,   191,   202,   203,   204,   205,
     182,   111,   410,   578,   568,   569,   116,   117,   118,   119,
     120,   469,   400,   233,   124,   125,   109,   110,   111,   112,
     113,   114,   565,   587,   585,   118,    56,   591,   121,   122,
     123,   237,   591,   587,   568,    65,   291,   475,    68,   132,
     372,    95,   461,    73,   286,    10,   550,   194,   476,    11,
      -1,   491,    -1,    -1,    -1,   495,    -1,   497,    -1,    -1,
      10,    -1,   268,    -1,    -1,    -1,    -1,   273,   274,   275,
     276,   277,   278,   279,   280,   281,   282,   283,   108,    10,
      -1,   111,    -1,   289,    -1,    -1,   116,   117,   118,   119,
     120,    56,    -1,   123,   124,   125,    -1,    -1,    -1,   129,
      65,    -1,    -1,    68,    -1,    -1,    56,    -1,    73,    -1,
      -1,    -1,    -1,    -1,   554,    65,    -1,    -1,    68,    -1,
      -1,    -1,    -1,    73,    -1,    56,   332,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    65,    -1,   342,    68,    -1,    -1,
      -1,    -1,    -1,   108,    -1,    -1,   111,    -1,    21,    -1,
      -1,   116,   117,   118,   119,   120,    29,    -1,   108,   124,
     125,   111,    -1,    -1,   129,    -1,   116,   117,   118,   119,
     120,    -1,    -1,    -1,   124,   125,    21,   108,    -1,    -1,
     111,    -1,    -1,    -1,    29,   116,   117,   118,   119,   120,
      63,    -1,    65,   124,   125,    -1,    -1,    -1,    -1,    -1,
      21,    -1,    75,    -1,    -1,    -1,    -1,    -1,    29,    -1,
      -1,   417,    -1,    -1,    -1,   421,    -1,    -1,    63,    -1,
      65,    -1,    -1,    -1,    -1,    -1,   432,    -1,    -1,    -1,
      75,    -1,    -1,    -1,   440,    -1,   109,   110,   111,   112,
     113,   114,    63,    -1,    65,   118,   119,    -1,   121,   122,
     123,    -1,    -1,    -1,    75,    -1,    -1,    -1,    -1,   132,
     133,    -1,    -1,   469,   109,   110,   111,   112,   113,   114,
      -1,    -1,    -1,   118,   119,    -1,   121,   122,   123,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,   132,   109,   110,
     111,   112,   113,   114,    -1,    -1,    -1,   118,   119,     3,
     121,   122,   123,    -1,    -1,     9,   512,    -1,    -1,    -1,
      -1,   132,    -1,    -1,    18,    -1,    -1,    -1,    -1,    23,
      24,     7,    26,    27,    28,    -1,    -1,    56,    32,    33,
      -1,    -1,    -1,    -1,    38,    39,    40,    41,    -1,    68,
      -1,    -1,    46,    -1,    -1,    31,    -1,    -1,    -1,    53,
      -1,    -1,    -1,    -1,    -1,    59,    60,    56,    62,    45,
      -1,    -1,    -1,    67,    -1,    51,    65,    -1,    -1,    68,
      -1,    -1,    56,    -1,    78,    -1,    -1,    -1,    -1,   108,
      84,    85,   111,    87,    68,    71,    -1,    -1,   117,   118,
     119,   120,    96,    79,    98,   124,   125,    -1,    -1,    -1,
      86,   105,    -1,   107,    -1,    -1,    -1,    93,    -1,   108,
      -1,    -1,   111,    -1,    -1,   101,    -1,   116,   117,   118,
     119,   120,    89,    -1,    -1,   124,   125,   111,    -1,    -1,
      -1,    -1,    -1,   117,   118,   119,   120,    -1,    -1,    -1,
     124,   125,   109,   110,   111,   112,    -1,   114,    -1,   116,
     117,   118,   119,   120,   109,    -1,   111,   124,   125,    -1,
      -1,   116,   117,   118,   119,   120,    -1,    -1,    -1,   124,
     125
};

/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
   symbol of state STATE-NUM.  */
static const yytype_uint16 yystos[] =
{
       0,     3,     9,    18,    23,    24,    26,    27,    28,    32,
      33,    38,    39,    40,    41,    46,    53,    59,    60,    62,
      67,    78,    84,    85,    87,    96,    98,   105,   107,   136,
     137,   138,   139,   141,   142,   148,   156,   164,   165,   168,
     174,   175,   178,   179,   180,   181,   185,   189,   191,   193,
     197,   200,   207,   208,   209,   210,   211,   212,   213,   214,
     215,   216,   218,   219,   226,   227,   228,   229,    95,    93,
      95,   104,   109,   268,   285,   274,   285,   104,    19,   145,
       7,    31,    45,    51,    71,    79,    86,    93,   101,   158,
     287,   276,   285,    44,     7,    31,    45,    51,    71,    86,
      93,   101,   190,   287,    95,    51,    16,    43,   166,     8,
      33,    53,    86,    87,    96,   169,   170,   171,    55,    29,
      63,   269,   285,   286,   110,   278,   284,   166,   269,   269,
     169,   104,    36,   231,   269,   269,   106,   103,   217,     0,
     136,   122,   269,    70,   269,   270,   285,   111,   116,   117,
     118,   119,   120,   124,   125,   159,   195,   285,   274,   276,
     269,   276,   157,   159,   145,   269,   270,   276,   111,   194,
     195,   241,   242,   276,   276,   274,     8,   112,   167,   283,
      76,    70,   134,   269,    94,   176,   283,     6,    17,   186,
     187,   188,    70,    70,    21,    65,    75,   111,   113,   114,
     118,   119,   121,   122,   123,   132,   259,   262,   266,   267,
     269,   276,   280,   281,   283,   284,   285,   288,    88,   279,
     285,   242,   218,   119,   240,   269,   103,   146,   132,   183,
      70,    14,   132,    14,   132,   160,    30,   102,   250,   132,
     132,   134,   250,    50,   177,   241,   171,   132,   221,   283,
     177,   277,   284,   277,   188,   187,   241,   285,   280,   281,
     259,   269,   259,   259,   259,   259,   259,   259,    10,    14,
      56,    65,    68,    73,   108,   111,   116,   117,   118,   119,
     120,   124,   125,   128,   260,    55,   134,   230,   127,   132,
     130,   127,   119,   262,   264,   265,   269,   281,   285,     5,
      80,    69,    44,    94,   143,   133,   184,   242,    83,   269,
     201,   140,   149,   150,   285,   229,   159,   161,   162,    42,
     259,   192,   242,    64,   196,   276,   276,   276,    94,   222,
     223,   285,    87,    99,   220,   177,    44,    14,   127,   133,
     259,   285,   108,   259,   259,   259,   259,   259,   259,   259,
     259,   259,   259,   259,    93,   267,    44,   247,   119,   263,
     272,   285,   119,   133,   259,   261,    89,   257,   258,   276,
     263,   260,   134,   247,   127,   260,    25,    25,   199,    90,
      91,   144,   284,   133,    89,   114,   163,   194,   282,   283,
     284,   285,    97,    70,   133,   134,   258,   116,   133,   134,
      87,   133,   134,   133,   134,    47,    77,   172,   285,   133,
     134,   260,   119,   224,   225,   259,   269,   132,   172,   258,
     259,   123,   129,   269,   248,   249,   251,   269,   250,   127,
     133,   133,   134,   276,   128,   255,   132,   265,   250,   119,
     116,   140,   198,   276,    97,   147,   285,   103,   182,   271,
     285,    33,    53,    87,    96,   205,    52,   155,   140,   163,
     162,   231,   276,    64,   276,   285,   103,   173,   223,   134,
     247,   127,   224,   259,   260,   134,    14,   275,   285,   119,
     128,   252,    47,   243,   119,   272,   259,   129,   283,   283,
     259,    94,    34,   160,    14,   132,    94,   132,    12,   151,
     266,    46,   225,   250,   119,   133,   129,   249,   275,   253,
     277,    20,    48,   246,   128,   256,   129,   133,   276,   284,
     284,   236,   237,   238,   272,   276,   285,   204,   269,   241,
     116,    92,   153,   247,    72,   260,   134,   129,   244,   245,
     262,   285,   259,    74,   232,   129,   283,   256,    57,   133,
     103,   239,   273,   285,   132,   250,   127,   133,    49,    58,
      64,   152,   116,    13,   154,   250,   254,   277,   134,    20,
     256,   129,   284,   273,   242,    37,   272,   284,   116,   232,
     129,   245,   233,   234,   262,   285,   256,   133,    54,   206,
     284,   134,    15,    35,    97,   235,   235,   239,    66,   128,
     202,   218,   234,   111,   124,   125,   203,   218,   129,   218,
     122
};

#define yyerrok		(yyerrstatus = 0)
#define yyclearin	(yychar = YYEMPTY)
#define YYEMPTY		(-2)
#define YYEOF		0

#define YYACCEPT	goto yyacceptlab
#define YYABORT		goto yyabortlab
#define YYERROR		goto yyerrorlab


/* Like YYERROR except do call yyerror.  This remains here temporarily
   to ease the transition to the new meaning of YYERROR, for GCC.
   Once GCC version 2 has supplanted version 1, this can go.  */

#define YYFAIL		goto yyerrlab

#define YYRECOVERING()  (!!yyerrstatus)

#define YYBACKUP(Token, Value)					\
do								\
  if (yychar == YYEMPTY && yylen == 1)				\
    {								\
      yychar = (Token);						\
      yylval = (Value);						\
      yytoken = YYTRANSLATE (yychar);				\
      YYPOPSTACK (1);						\
      goto yybackup;						\
    }								\
  else								\
    {								\
      yyerror (YY_("syntax error: cannot back up")); \
      YYERROR;							\
    }								\
while (YYID (0))


#define YYTERROR	1
#define YYERRCODE	256


/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
   If N is 0, then set CURRENT to the empty location which ends
   the previous symbol: RHS[0] (always defined).  */

#define YYRHSLOC(Rhs, K) ((Rhs)[K])
#ifndef YYLLOC_DEFAULT
# define YYLLOC_DEFAULT(Current, Rhs, N)				\
    do									\
      if (YYID (N))                                                    \
	{								\
	  (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;	\
	  (Current).first_column = YYRHSLOC (Rhs, 1).first_column;	\
	  (Current).last_line    = YYRHSLOC (Rhs, N).last_line;		\
	  (Current).last_column  = YYRHSLOC (Rhs, N).last_column;	\
	}								\
      else								\
	{								\
	  (Current).first_line   = (Current).last_line   =		\
	    YYRHSLOC (Rhs, 0).last_line;				\
	  (Current).first_column = (Current).last_column =		\
	    YYRHSLOC (Rhs, 0).last_column;				\
	}								\
    while (YYID (0))
#endif


/* YY_LOCATION_PRINT -- Print the location on the stream.
   This macro was not mandated originally: define only if we know
   we won't break user code: when these are the locations we know.  */

#ifndef YY_LOCATION_PRINT
# if YYLTYPE_IS_TRIVIAL
#  define YY_LOCATION_PRINT(File, Loc)			\
     fprintf (File, "%d.%d-%d.%d",			\
	      (Loc).first_line, (Loc).first_column,	\
	      (Loc).last_line,  (Loc).last_column)
# else
#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
# endif
#endif


/* YYLEX -- calling `yylex' with the right arguments.  */

#ifdef YYLEX_PARAM
# define YYLEX yylex (YYLEX_PARAM)
#else
# define YYLEX yylex ()
#endif

/* Enable debugging if requested.  */
#if YYDEBUG

# ifndef YYFPRINTF
#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
#  define YYFPRINTF fprintf
# endif

# define YYDPRINTF(Args)			\
do {						\
  if (yydebug)					\
    YYFPRINTF Args;				\
} while (YYID (0))

# define YY_SYMBOL_PRINT(Title, Type, Value, Location)			  \
do {									  \
  if (yydebug)								  \
    {									  \
      YYFPRINTF (stderr, "%s ", Title);					  \
      yy_symbol_print (stderr,						  \
		  Type, Value); \
      YYFPRINTF (stderr, "\n");						  \
    }									  \
} while (YYID (0))


/*--------------------------------.
| Print this symbol on YYOUTPUT.  |
`--------------------------------*/

/*ARGSUSED*/
#if (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
static void
yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
#else
static void
yy_symbol_value_print (yyoutput, yytype, yyvaluep)
    FILE *yyoutput;
    int yytype;
    YYSTYPE const * const yyvaluep;
#endif
{
  if (!yyvaluep)
    return;
# ifdef YYPRINT
  if (yytype < YYNTOKENS)
    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
# else
  YYUSE (yyoutput);
# endif
  switch (yytype)
    {
      default:
	break;
    }
}


/*--------------------------------.
| Print this symbol on YYOUTPUT.  |
`--------------------------------*/

#if (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
static void
yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
#else
static void
yy_symbol_print (yyoutput, yytype, yyvaluep)
    FILE *yyoutput;
    int yytype;
    YYSTYPE const * const yyvaluep;
#endif
{
  if (yytype < YYNTOKENS)
    YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
  else
    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);

  yy_symbol_value_print (yyoutput, yytype, yyvaluep);
  YYFPRINTF (yyoutput, ")");
}

/*------------------------------------------------------------------.
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
| TOP (included).                                                   |
`------------------------------------------------------------------*/

#if (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
static void
yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
#else
static void
yy_stack_print (yybottom, yytop)
    yytype_int16 *yybottom;
    yytype_int16 *yytop;
#endif
{
  YYFPRINTF (stderr, "Stack now");
  for (; yybottom <= yytop; yybottom++)
    {
      int yybot = *yybottom;
      YYFPRINTF (stderr, " %d", yybot);
    }
  YYFPRINTF (stderr, "\n");
}

# define YY_STACK_PRINT(Bottom, Top)				\
do {								\
  if (yydebug)							\
    yy_stack_print ((Bottom), (Top));				\
} while (YYID (0))


/*------------------------------------------------.
| Report that the YYRULE is going to be reduced.  |
`------------------------------------------------*/

#if (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
static void
yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
#else
static void
yy_reduce_print (yyvsp, yyrule)
    YYSTYPE *yyvsp;
    int yyrule;
#endif
{
  int yynrhs = yyr2[yyrule];
  int yyi;
  unsigned long int yylno = yyrline[yyrule];
  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
	     yyrule - 1, yylno);
  /* The symbols being reduced.  */
  for (yyi = 0; yyi < yynrhs; yyi++)
    {
      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
      yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
		       &(yyvsp[(yyi + 1) - (yynrhs)])
		       		       );
      YYFPRINTF (stderr, "\n");
    }
}

# define YY_REDUCE_PRINT(Rule)		\
do {					\
  if (yydebug)				\
    yy_reduce_print (yyvsp, Rule); \
} while (YYID (0))

/* Nonzero means print parse trace.  It is left uninitialized so that
   multiple parsers can coexist.  */
int yydebug;
#else /* !YYDEBUG */
# define YYDPRINTF(Args)
# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
# define YY_STACK_PRINT(Bottom, Top)
# define YY_REDUCE_PRINT(Rule)
#endif /* !YYDEBUG */


/* YYINITDEPTH -- initial size of the parser's stacks.  */
#ifndef	YYINITDEPTH
# define YYINITDEPTH 200
#endif

/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
   if the built-in stack extension method is used).

   Do not make this value too large; the results are undefined if
   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
   evaluated with infinite-precision integer arithmetic.  */

#ifndef YYMAXDEPTH
# define YYMAXDEPTH 10000
#endif



#if YYERROR_VERBOSE

# ifndef yystrlen
#  if defined __GLIBC__ && defined _STRING_H
#   define yystrlen strlen
#  else
/* Return the length of YYSTR.  */
#if (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
static YYSIZE_T
yystrlen (const char *yystr)
#else
static YYSIZE_T
yystrlen (yystr)
    const char *yystr;
#endif
{
  YYSIZE_T yylen;
  for (yylen = 0; yystr[yylen]; yylen++)
    continue;
  return yylen;
}
#  endif
# endif

# ifndef yystpcpy
#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
#   define yystpcpy stpcpy
#  else
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
   YYDEST.  */
#if (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
static char *
yystpcpy (char *yydest, const char *yysrc)
#else
static char *
yystpcpy (yydest, yysrc)
    char *yydest;
    const char *yysrc;
#endif
{
  char *yyd = yydest;
  const char *yys = yysrc;

  while ((*yyd++ = *yys++) != '\0')
    continue;

  return yyd - 1;
}
#  endif
# endif

# ifndef yytnamerr
/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
   quotes and backslashes, so that it's suitable for yyerror.  The
   heuristic is that double-quoting is unnecessary unless the string
   contains an apostrophe, a comma, or backslash (other than
   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
   null, do not copy; instead, return the length of what the result
   would have been.  */
static YYSIZE_T
yytnamerr (char *yyres, const char *yystr)
{
  if (*yystr == '"')
    {
      YYSIZE_T yyn = 0;
      char const *yyp = yystr;

      for (;;)
	switch (*++yyp)
	  {
	  case '\'':
	  case ',':
	    goto do_not_strip_quotes;

	  case '\\':
	    if (*++yyp != '\\')
	      goto do_not_strip_quotes;
	    /* Fall through.  */
	  default:
	    if (yyres)
	      yyres[yyn] = *yyp;
	    yyn++;
	    break;

	  case '"':
	    if (yyres)
	      yyres[yyn] = '\0';
	    return yyn;
	  }
    do_not_strip_quotes: ;
    }

  if (! yyres)
    return yystrlen (yystr);

  return yystpcpy (yyres, yystr) - yyres;
}
# endif

/* Copy into YYRESULT an error message about the unexpected token
   YYCHAR while in state YYSTATE.  Return the number of bytes copied,
   including the terminating null byte.  If YYRESULT is null, do not
   copy anything; just return the number of bytes that would be
   copied.  As a special case, return 0 if an ordinary "syntax error"
   message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
   size calculation.  */
static YYSIZE_T
yysyntax_error (char *yyresult, int yystate, int yychar)
{
  int yyn = yypact[yystate];

  if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
    return 0;
  else
    {
      int yytype = YYTRANSLATE (yychar);
      YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
      YYSIZE_T yysize = yysize0;
      YYSIZE_T yysize1;
      int yysize_overflow = 0;
      enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
      char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
      int yyx;

# if 0
      /* This is so xgettext sees the translatable formats that are
	 constructed on the fly.  */
      YY_("syntax error, unexpected %s");
      YY_("syntax error, unexpected %s, expecting %s");
      YY_("syntax error, unexpected %s, expecting %s or %s");
      YY_("syntax error, unexpected %s, expecting %s or %s or %s");
      YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
# endif
      char *yyfmt;
      char const *yyf;
      static char const yyunexpected[] = "syntax error, unexpected %s";
      static char const yyexpecting[] = ", expecting %s";
      static char const yyor[] = " or %s";
      char yyformat[sizeof yyunexpected
		    + sizeof yyexpecting - 1
		    + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
		       * (sizeof yyor - 1))];
      char const *yyprefix = yyexpecting;

      /* Start YYX at -YYN if negative to avoid negative indexes in
	 YYCHECK.  */
      int yyxbegin = yyn < 0 ? -yyn : 0;

      /* Stay within bounds of both yycheck and yytname.  */
      int yychecklim = YYLAST - yyn + 1;
      int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
      int yycount = 1;

      yyarg[0] = yytname[yytype];
      yyfmt = yystpcpy (yyformat, yyunexpected);

      for (yyx = yyxbegin; yyx < yyxend; ++yyx)
	if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
	  {
	    if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
	      {
		yycount = 1;
		yysize = yysize0;
		yyformat[sizeof yyunexpected - 1] = '\0';
		break;
	      }
	    yyarg[yycount++] = yytname[yyx];
	    yysize1 = yysize + yytnamerr (0, yytname[yyx]);
	    yysize_overflow |= (yysize1 < yysize);
	    yysize = yysize1;
	    yyfmt = yystpcpy (yyfmt, yyprefix);
	    yyprefix = yyor;
	  }

      yyf = YY_(yyformat);
      yysize1 = yysize + yystrlen (yyf);
      yysize_overflow |= (yysize1 < yysize);
      yysize = yysize1;

      if (yysize_overflow)
	return YYSIZE_MAXIMUM;

      if (yyresult)
	{
	  /* Avoid sprintf, as that infringes on the user's name space.
	     Don't have undefined behavior even if the translation
	     produced a string with the wrong number of "%s"s.  */
	  char *yyp = yyresult;
	  int yyi = 0;
	  while ((*yyp = *yyf) != '\0')
	    {
	      if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
		{
		  yyp += yytnamerr (yyp, yyarg[yyi++]);
		  yyf += 2;
		}
	      else
		{
		  yyp++;
		  yyf++;
		}
	    }
	}
      return yysize;
    }
}
#endif /* YYERROR_VERBOSE */


/*-----------------------------------------------.
| Release the memory associated to this symbol.  |
`-----------------------------------------------*/

/*ARGSUSED*/
#if (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
static void
yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
#else
static void
yydestruct (yymsg, yytype, yyvaluep)
    const char *yymsg;
    int yytype;
    YYSTYPE *yyvaluep;
#endif
{
  YYUSE (yyvaluep);

  if (!yymsg)
    yymsg = "Deleting";
  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);

  switch (yytype)
    {

      default:
	break;
    }
}

/* Prevent warnings from -Wmissing-prototypes.  */
#ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus
int yyparse (void *YYPARSE_PARAM);
#else
int yyparse ();
#endif
#else /* ! YYPARSE_PARAM */
#if defined __STDC__ || defined __cplusplus
int yyparse (void);
#else
int yyparse ();
#endif
#endif /* ! YYPARSE_PARAM */


/* The lookahead symbol.  */
int yychar;

/* The semantic value of the lookahead symbol.  */
YYSTYPE yylval;

/* Number of syntax errors so far.  */
int yynerrs;



/*-------------------------.
| yyparse or yypush_parse.  |
`-------------------------*/

#ifdef YYPARSE_PARAM
#if (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
int
yyparse (void *YYPARSE_PARAM)
#else
int
yyparse (YYPARSE_PARAM)
    void *YYPARSE_PARAM;
#endif
#else /* ! YYPARSE_PARAM */
#if (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
int
yyparse (void)
#else
int
yyparse ()

#endif
#endif
{


    int yystate;
    /* Number of tokens to shift before error messages enabled.  */
    int yyerrstatus;

    /* The stacks and their tools:
       `yyss': related to states.
       `yyvs': related to semantic values.

       Refer to the stacks thru separate pointers, to allow yyoverflow
       to reallocate them elsewhere.  */

    /* The state stack.  */
    yytype_int16 yyssa[YYINITDEPTH];
    yytype_int16 *yyss;
    yytype_int16 *yyssp;

    /* The semantic value stack.  */
    YYSTYPE yyvsa[YYINITDEPTH];
    YYSTYPE *yyvs;
    YYSTYPE *yyvsp;

    YYSIZE_T yystacksize;

  int yyn;
  int yyresult;
  /* Lookahead token as an internal (translated) token number.  */
  int yytoken;
  /* The variables used to return semantic value and location from the
     action routines.  */
  YYSTYPE yyval;

#if YYERROR_VERBOSE
  /* Buffer for error messages, and its allocated size.  */
  char yymsgbuf[128];
  char *yymsg = yymsgbuf;
  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
#endif

#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))

  /* The number of symbols on the RHS of the reduced rule.
     Keep to zero when no symbol should be popped.  */
  int yylen = 0;

  yytoken = 0;
  yyss = yyssa;
  yyvs = yyvsa;
  yystacksize = YYINITDEPTH;

  YYDPRINTF ((stderr, "Starting parse\n"));

  yystate = 0;
  yyerrstatus = 0;
  yynerrs = 0;
  yychar = YYEMPTY; /* Cause a token to be read.  */

  /* Initialize stack pointers.
     Waste one element of value and location stack
     so that they stay on the same level as the state stack.
     The wasted elements are never initialized.  */
  yyssp = yyss;
  yyvsp = yyvs;

  goto yysetstate;

/*------------------------------------------------------------.
| yynewstate -- Push a new state, which is found in yystate.  |
`------------------------------------------------------------*/
 yynewstate:
  /* In all cases, when you get here, the value and location stacks
     have just been pushed.  So pushing a state here evens the stacks.  */
  yyssp++;

 yysetstate:
  *yyssp = yystate;

  if (yyss + yystacksize - 1 <= yyssp)
    {
      /* Get the current used size of the three stacks, in elements.  */
      YYSIZE_T yysize = yyssp - yyss + 1;

#ifdef yyoverflow
      {
	/* Give user a chance to reallocate the stack.  Use copies of
	   these so that the &'s don't force the real ones into
	   memory.  */
	YYSTYPE *yyvs1 = yyvs;
	yytype_int16 *yyss1 = yyss;

	/* Each stack pointer address is followed by the size of the
	   data in use in that stack, in bytes.  This used to be a
	   conditional around just the two extra args, but that might
	   be undefined if yyoverflow is a macro.  */
	yyoverflow (YY_("memory exhausted"),
		    &yyss1, yysize * sizeof (*yyssp),
		    &yyvs1, yysize * sizeof (*yyvsp),
		    &yystacksize);

	yyss = yyss1;
	yyvs = yyvs1;
      }
#else /* no yyoverflow */
# ifndef YYSTACK_RELOCATE
      goto yyexhaustedlab;
# else
      /* Extend the stack our own way.  */
      if (YYMAXDEPTH <= yystacksize)
	goto yyexhaustedlab;
      yystacksize *= 2;
      if (YYMAXDEPTH < yystacksize)
	yystacksize = YYMAXDEPTH;

      {
	yytype_int16 *yyss1 = yyss;
	union yyalloc *yyptr =
	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
	if (! yyptr)
	  goto yyexhaustedlab;
	YYSTACK_RELOCATE (yyss_alloc, yyss);
	YYSTACK_RELOCATE (yyvs_alloc, yyvs);
#  undef YYSTACK_RELOCATE
	if (yyss1 != yyssa)
	  YYSTACK_FREE (yyss1);
      }
# endif
#endif /* no yyoverflow */

      yyssp = yyss + yysize - 1;
      yyvsp = yyvs + yysize - 1;

      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
		  (unsigned long int) yystacksize));

      if (yyss + yystacksize - 1 <= yyssp)
	YYABORT;
    }

  YYDPRINTF ((stderr, "Entering state %d\n", yystate));

  if (yystate == YYFINAL)
    YYACCEPT;

  goto yybackup;

/*-----------.
| yybackup.  |
`-----------*/
yybackup:

  /* Do appropriate processing given the current state.  Read a
     lookahead token if we need one and don't already have one.  */

  /* First try to decide what to do without reference to lookahead token.  */
  yyn = yypact[yystate];
  if (yyn == YYPACT_NINF)
    goto yydefault;

  /* Not known => get a lookahead token if don't already have one.  */

  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
  if (yychar == YYEMPTY)
    {
      YYDPRINTF ((stderr, "Reading a token: "));
      yychar = YYLEX;
    }

  if (yychar <= YYEOF)
    {
      yychar = yytoken = YYEOF;
      YYDPRINTF ((stderr, "Now at end of input.\n"));
    }
  else
    {
      yytoken = YYTRANSLATE (yychar);
      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
    }

  /* If the proper action on seeing token YYTOKEN is to reduce or to
     detect an error, take that action.  */
  yyn += yytoken;
  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
    goto yydefault;
  yyn = yytable[yyn];
  if (yyn <= 0)
    {
      if (yyn == 0 || yyn == YYTABLE_NINF)
	goto yyerrlab;
      yyn = -yyn;
      goto yyreduce;
    }

  /* Count tokens shifted since error; after three, turn off error
     status.  */
  if (yyerrstatus)
    yyerrstatus--;

  /* Shift the lookahead token.  */
  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);

  /* Discard the shifted token.  */
  yychar = YYEMPTY;

  yystate = yyn;
  *++yyvsp = yylval;

  goto yynewstate;


/*-----------------------------------------------------------.
| yydefault -- do the default action for the current state.  |
`-----------------------------------------------------------*/
yydefault:
  yyn = yydefact[yystate];
  if (yyn == 0)
    goto yyerrlab;
  goto yyreduce;


/*-----------------------------.
| yyreduce -- Do a reduction.  |
`-----------------------------*/
yyreduce:
  /* yyn is the number of a rule to reduce with.  */
  yylen = yyr2[yyn];

  /* If YYLEN is nonzero, implement the default value of the action:
     `$$ = $1'.

     Otherwise, the following line sets YYVAL to garbage.
     This behavior is undocumented and Bison
     users should not rely upon it.  Assigning to YYVAL
     unconditionally makes the parser a bit smaller, and it avoids a
     GCC warning that YYVAL may be used uninitialized.  */
  yyval = yyvsp[1-yylen];


  YY_REDUCE_PRINT (yyn);
  switch (yyn)
    {
        case 2:

/* Line 1455 of yacc.c  */
#line 193 "gram.y"
    { parse_tree = lcons((yyvsp[(1) - (2)].node), parse_tree); ;}
    break;

  case 3:

/* Line 1455 of yacc.c  */
#line 195 "gram.y"
    { parse_tree = lcons((yyvsp[(1) - (1)].node), NIL); ;}
    break;

  case 5:

/* Line 1455 of yacc.c  */
#line 199 "gram.y"
    {  (yyval.node) = (yyvsp[(1) - (2)].node);  ;}
    break;

  case 36:

/* Line 1455 of yacc.c  */
#line 242 "gram.y"
    {
					printf("> unsupport sql statement\n");
		;}
    break;

  case 37:

/* Line 1455 of yacc.c  */
#line 248 "gram.y"
    {
					printf("> unsupport sql statement\n");
		;}
    break;

  case 38:

/* Line 1455 of yacc.c  */
#line 262 "gram.y"
    {
					printf("> unsupport sql statement\n");
		;}
    break;

  case 39:

/* Line 1455 of yacc.c  */
#line 277 "gram.y"
    {
					printf("> unsupport sql statement\n");
		;}
    break;

  case 40:

/* Line 1455 of yacc.c  */
#line 283 "gram.y"
    { printf("> unsupport sql statement\n"); ;}
    break;

  case 41:

/* Line 1455 of yacc.c  */
#line 285 "gram.y"
    { printf("> unsupport sql statement\n"); ;}
    break;

  case 42:

/* Line 1455 of yacc.c  */
#line 293 "gram.y"
    {printf("> unsupport sql statement\n");;}
    break;

  case 43:

/* Line 1455 of yacc.c  */
#line 294 "gram.y"
    {printf("> unsupport sql statement\n");;}
    break;

  case 44:

/* Line 1455 of yacc.c  */
#line 295 "gram.y"
    {printf("> unsupport sql statement\n");;}
    break;

  case 45:

/* Line 1455 of yacc.c  */
#line 298 "gram.y"
    {printf("> unsupport sql statement\n");;}
    break;

  case 46:

/* Line 1455 of yacc.c  */
#line 299 "gram.y"
    {printf("> unsupport sql statement\n");;}
    break;

  case 47:

/* Line 1455 of yacc.c  */
#line 302 "gram.y"
    { printf("> unsupport sql statement\n"); ;}
    break;

  case 48:

/* Line 1455 of yacc.c  */
#line 303 "gram.y"
    { printf("> unsupport sql statement\n"); ;}
    break;

  case 49:

/* Line 1455 of yacc.c  */
#line 309 "gram.y"
    { printf("> unsupport sql statement\n");;}
    break;

  case 50:

/* Line 1455 of yacc.c  */
#line 310 "gram.y"
    { printf("> unsupport sql statement\n"); ;}
    break;

  case 51:

/* Line 1455 of yacc.c  */
#line 323 "gram.y"
    {
					printf("> unsupport sql statement\n");
		;}
    break;

  case 52:

/* Line 1455 of yacc.c  */
#line 328 "gram.y"
    { (yyval.list) = (yyvsp[(1) - (1)].list); ;}
    break;

  case 53:

/* Line 1455 of yacc.c  */
#line 329 "gram.y"
    { (yyval.list) = NULL; ;}
    break;

  case 54:

/* Line 1455 of yacc.c  */
#line 334 "gram.y"
    { printf("> unsupport sql statement\n"); ;}
    break;

  case 55:

/* Line 1455 of yacc.c  */
#line 336 "gram.y"
    { printf("> unsupport sql statement\n"); ;}
    break;

  case 56:

/* Line 1455 of yacc.c  */
#line 340 "gram.y"
    { printf("> unsupport sql statement\n"); ;}
    break;

  case 57:

/* Line 1455 of yacc.c  */
#line 341 "gram.y"
    { printf("> unsupport sql statement\n"); ;}
    break;

  case 58:

/* Line 1455 of yacc.c  */
#line 344 "gram.y"
    { printf("> unsupport sql statement\n"); ;}
    break;

  case 59:

/* Line 1455 of yacc.c  */
#line 345 "gram.y"
    { printf("> unsupport sql statement\n"); ;}
    break;

  case 60:

/* Line 1455 of yacc.c  */
#line 346 "gram.y"
    { printf("> unsupport sql statement\n"); ;}
    break;

  case 61:

/* Line 1455 of yacc.c  */
#line 350 "gram.y"
    {  printf("> unsupport sql statement\n");  ;}
    break;

  case 62:

/* Line 1455 of yacc.c  */
#line 352 "gram.y"
    {  printf("> unsupport sql statement\n");  ;}
    break;

  case 63:

/* Line 1455 of yacc.c  */
#line 356 "gram.y"
    {  printf("> unsupport sql statement\n");  ;}
    break;

  case 64:

/* Line 1455 of yacc.c  */
#line 358 "gram.y"
    {  printf("> unsupport sql statement\n");  ;}
    break;

  case 65:

/* Line 1455 of yacc.c  */
#line 361 "gram.y"
    { printf("> unsupport sql statement\n"); ;}
    break;

  case 66:

/* Line 1455 of yacc.c  */
#line 362 "gram.y"
    { printf("> unsupport sql statement\n"); ;}
    break;

  case 67:

/* Line 1455 of yacc.c  */
#line 374 "gram.y"
    {
					printf("> unsupport sql statement\n");
		;}
    break;

  case 68:

/* Line 1455 of yacc.c  */
#line 380 "gram.y"
    {
					printf("> unsupport sql statement\n");
		;}
    break;

  case 69:

/* Line 1455 of yacc.c  */
#line 385 "gram.y"
    { printf("> unsupport sql statement\n"); ;}
    break;

  case 70:

/* Line 1455 of yacc.c  */
#line 386 "gram.y"
    { printf("> unsupport sql statement\n"); ;}
    break;

  case 71:

/* Line 1455 of yacc.c  */
#line 387 "gram.y"
    { printf("> unsupport sql statement\n"); ;}
    break;

  case 75:

/* Line 1455 of yacc.c  */
#line 394 "gram.y"
    { printf("> unsupport sql statement\n"); ;}
    break;

  case 76:

/* Line 1455 of yacc.c  */
#line 399 "gram.y"
    { printf("> unsupport sql statement\n"); ;}
    break;

  case 77:

/* Line 1455 of yacc.c  */
#line 401 "gram.y"
    { printf("> unsupport sql statement\n"); ;}
    break;

  case 78:

/* Line 1455 of yacc.c  */
#line 405 "gram.y"
    {
					printf("> unsupport sql statement\n");
		;}
    break;

  case 79:

/* Line 1455 of yacc.c  */
#line 409 "gram.y"
    {
					printf("> unsupport sql statement\n");
		;}
    break;

  case 80:

/* Line 1455 of yacc.c  */
#line 414 "gram.y"
    {  printf("> unsupport sql statement\n"); ;}
    break;

  case 81:

/* Line 1455 of yacc.c  */
#line 415 "gram.y"
    {  printf("> unsupport sql statement\n"); ;}
    break;

  case 82:

/* Line 1455 of yacc.c  */
#line 416 "gram.y"
    {  printf("> unsupport sql statement\n"); ;}
    break;

  case 83:

/* Line 1455 of yacc.c  */
#line 417 "gram.y"
    {  printf("> unsupport sql statement\n"); ;}
    break;

  case 84:

/* Line 1455 of yacc.c  */
#line 418 "gram.y"
    {
								  printf("> unsupport sql statement\n");
				;}
    break;

  case 85:

/* Line 1455 of yacc.c  */
#line 432 "gram.y"
    {
					printf("> unsupport sql statement\n");
		;}
    break;

  case 86:

/* Line 1455 of yacc.c  */
#line 446 "gram.y"
    {
					printf("> unsupport sql statement\n");
			;}
    break;

  case 87:

/* Line 1455 of yacc.c  */
#line 451 "gram.y"
    { printf("> unsupport sql statement\n"); ;}
    break;

  case 88:

/* Line 1455 of yacc.c  */
#line 452 "gram.y"
    { printf("> unsupport sql statement\n"); ;}
    break;

  case 89:

/* Line 1455 of yacc.c  */
#line 453 "gram.y"
    {  ;}
    break;

  case 90:

/* Line 1455 of yacc.c  */
#line 457 "gram.y"
    { (yyval.ival) = (yyvsp[(1) - (1)].ival);
		 if ((yyvsp[(1) - (1)].ival) <= 0) elog(WARN,"Please specify nonnegative count for fetch"); ;}
    break;

  case 91:

/* Line 1455 of yacc.c  */
#line 459 "gram.y"
    { printf("> unsupport sql statement\n");;}
    break;

  case 92:

/* Line 1455 of yacc.c  */
#line 460 "gram.y"
    { (yyval.ival) = 1; /*default*/ ;}
    break;

  case 93:

/* Line 1455 of yacc.c  */
#line 471 "gram.y"
    {
				printf("> unsupport sql statement\n");
		   ;}
    break;

  case 94:

/* Line 1455 of yacc.c  */
#line 477 "gram.y"
    {
				printf("> unsupport sql statement\n");
		;}
    break;

  case 95:

/* Line 1455 of yacc.c  */
#line 481 "gram.y"
    {
				printf("> unsupport sql statement\n");
		;}
    break;

  case 96:

/* Line 1455 of yacc.c  */
#line 484 "gram.y"
    {
				printf("> unsupport sql statement\n");
		;}
    break;

  case 97:

/* Line 1455 of yacc.c  */
#line 489 "gram.y"
    {
						printf("> unsupport sql statement\n");
			;}
    break;

  case 98:

/* Line 1455 of yacc.c  */
#line 493 "gram.y"
    {
								printf("> unsupport sql statement\n");
			;}
    break;

  case 99:

/* Line 1455 of yacc.c  */
#line 498 "gram.y"
    {
				printf("> unsupport sql statement\n");
		;}
    break;

  case 100:

/* Line 1455 of yacc.c  */
#line 501 "gram.y"
    {
				printf("> unsupport sql statement\n");
		;}
    break;

  case 101:

/* Line 1455 of yacc.c  */
#line 504 "gram.y"
    {
				printf("> unsupport sql statement\n");
		;}
    break;

  case 102:

/* Line 1455 of yacc.c  */
#line 507 "gram.y"
    {
				printf("> unsupport sql statement\n");
		;}
    break;

  case 103:

/* Line 1455 of yacc.c  */
#line 510 "gram.y"
    {
				printf("> unsupport sql statement\n");
		;}
    break;

  case 104:

/* Line 1455 of yacc.c  */
#line 515 "gram.y"
    {
				printf("> unsupport sql statement\n");
		;}
    break;

  case 105:

/* Line 1455 of yacc.c  */
#line 518 "gram.y"
    {
				printf("> unsupport sql statement\n");
		;}
    break;

  case 106:

/* Line 1455 of yacc.c  */
#line 521 "gram.y"
    {
				printf("> unsupport sql statement\n");
		;}
    break;

  case 108:

/* Line 1455 of yacc.c  */
#line 528 "gram.y"
    {
					printf("> unsupport sql statement\n");
				;}
    break;

  case 109:

/* Line 1455 of yacc.c  */
#line 540 "gram.y"
    {
				printf("> unsupport sql statement\n");
			  ;}
    break;

  case 110:

/* Line 1455 of yacc.c  */
#line 553 "gram.y"
    {
					printf("> unsupport sql statement\n");
		;}
    break;

  case 111:

/* Line 1455 of yacc.c  */
#line 557 "gram.y"
    {
					printf("> unsupport sql statement\n");
		;}
    break;

  case 112:

/* Line 1455 of yacc.c  */
#line 562 "gram.y"
    { printf("> unsupport sql statement\n"); ;}
    break;

  case 113:

/* Line 1455 of yacc.c  */
#line 563 "gram.y"
    { (yyval.ival) = 1; /* default */ ;}
    break;

  case 114:

/* Line 1455 of yacc.c  */
#line 566 "gram.y"
    { printf("> unsupport sql statement\n");;}
    break;

  case 115:

/* Line 1455 of yacc.c  */
#line 567 "gram.y"
    { (yyval.str) = NULL; ;}
    break;

  case 116:

/* Line 1455 of yacc.c  */
#line 583 "gram.y"
    {
					printf("> unsupport sql statement\n");
		;}
    break;

  case 117:

/* Line 1455 of yacc.c  */
#line 596 "gram.y"
    {
				   printf("> unsupport sql statement\n");
		;}
    break;

  case 118:

/* Line 1455 of yacc.c  */
#line 609 "gram.y"
    {
					printf("> unsupport sql statement\n");
		;}
    break;

  case 119:

/* Line 1455 of yacc.c  */
#line 633 "gram.y"
    {
					printf("> unsupport sql statement\n");
		;}
    break;

  case 120:

/* Line 1455 of yacc.c  */
#line 637 "gram.y"
    { printf("> unsupport sql statement\n"); ;}
    break;

  case 121:

/* Line 1455 of yacc.c  */
#line 638 "gram.y"
    { (yyval.list) = NIL; ;}
    break;

  case 122:

/* Line 1455 of yacc.c  */
#line 641 "gram.y"
    { printf("> unsupport sql statement\n"); ;}
    break;

  case 123:

/* Line 1455 of yacc.c  */
#line 642 "gram.y"
    { (yyval.list) = NIL; ;}
    break;

  case 125:

/* Line 1455 of yacc.c  */
#line 658 "gram.y"
    {
				   printf("> unsupport sql statement\n");
		;}
    break;

  case 126:

/* Line 1455 of yacc.c  */
#line 664 "gram.y"
    {
				   printf("> unsupport sql statement\n");
		;}
    break;

  case 127:

/* Line 1455 of yacc.c  */
#line 668 "gram.y"
    {
					printf("> unsupport sql statement\n");
		;}
    break;

  case 128:

/* Line 1455 of yacc.c  */
#line 672 "gram.y"
    {
					printf("> unsupport sql statement\n");
		;}
    break;

  case 129:

/* Line 1455 of yacc.c  */
#line 676 "gram.y"
    {
					printf("> unsupport sql statement\n");
		;}
    break;

  case 130:

/* Line 1455 of yacc.c  */
#line 680 "gram.y"
    {
					printf("> unsupport sql statement\n");
		;}
    break;

  case 131:

/* Line 1455 of yacc.c  */
#line 685 "gram.y"
    { printf("> unsupport sql statement\n"); ;}
    break;

  case 132:

/* Line 1455 of yacc.c  */
#line 686 "gram.y"
    { printf("> unsupport sql statement\n"); ;}
    break;

  case 133:

/* Line 1455 of yacc.c  */
#line 705 "gram.y"
    {
					printf("> unsupport sql statement\n");
		;}
    break;

  case 134:

/* Line 1455 of yacc.c  */
#line 710 "gram.y"
    {  (yyval.ival) = AGGREGATE; ;}
    break;

  case 135:

/* Line 1455 of yacc.c  */
#line 711 "gram.y"
    {  (yyval.ival) = P_TYPE; ;}
    break;

  case 136:

/* Line 1455 of yacc.c  */
#line 712 "gram.y"
    {  (yyval.ival) = INDEX; ;}
    break;

  case 137:

/* Line 1455 of yacc.c  */
#line 713 "gram.y"
    {  (yyval.ival) = RULE; ;}
    break;

  case 138:

/* Line 1455 of yacc.c  */
#line 714 "gram.y"
    {  (yyval.ival) = VIEW; ;}
    break;

  case 139:

/* Line 1455 of yacc.c  */
#line 718 "gram.y"
    {
					printf("> unsupport sql statement\n");
			;}
    break;

  case 140:

/* Line 1455 of yacc.c  */
#line 723 "gram.y"
    { printf("> unsupport sql statement\n"); ;}
    break;

  case 141:

/* Line 1455 of yacc.c  */
#line 724 "gram.y"
    { (yyval.list) = NIL; ;}
    break;

  case 142:

/* Line 1455 of yacc.c  */
#line 728 "gram.y"
    {
					printf("> unsupport sql statement\n");
		;}
    break;

  case 145:

/* Line 1455 of yacc.c  */
#line 735 "gram.y"
    { (yyval.str) = "+"; ;}
    break;

  case 146:

/* Line 1455 of yacc.c  */
#line 736 "gram.y"
    { (yyval.str) = "-"; ;}
    break;

  case 147:

/* Line 1455 of yacc.c  */
#line 737 "gram.y"
    { (yyval.str) = "*"; ;}
    break;

  case 148:

/* Line 1455 of yacc.c  */
#line 738 "gram.y"
    { (yyval.str) = "/"; ;}
    break;

  case 149:

/* Line 1455 of yacc.c  */
#line 739 "gram.y"
    { (yyval.str) = "<"; ;}
    break;

  case 150:

/* Line 1455 of yacc.c  */
#line 740 "gram.y"
    { (yyval.str) = ">"; ;}
    break;

  case 151:

/* Line 1455 of yacc.c  */
#line 741 "gram.y"
    { (yyval.str) = "="; ;}
    break;

  case 152:

/* Line 1455 of yacc.c  */
#line 745 "gram.y"
    {
		   elog(WARN, "parser: argument type missing (use NONE for unary operators)");
		;}
    break;

  case 153:

/* Line 1455 of yacc.c  */
#line 749 "gram.y"
    {printf("> unsupport sql statement\n");;}
    break;

  case 154:

/* Line 1455 of yacc.c  */
#line 751 "gram.y"
    { printf("> unsupport sql statement\n");;}
    break;

  case 155:

/* Line 1455 of yacc.c  */
#line 753 "gram.y"
    {printf("> unsupport sql statement\n");;}
    break;

  case 156:

/* Line 1455 of yacc.c  */
#line 766 "gram.y"
    {
					printf("> unsupport sql statement\n");
		;}
    break;

  case 157:

/* Line 1455 of yacc.c  */
#line 771 "gram.y"
    { (yyval.str) = (yyvsp[(1) - (1)].str); ;}
    break;

  case 158:

/* Line 1455 of yacc.c  */
#line 772 "gram.y"
    { (yyval.str) = NULL; ;}
    break;

  case 159:

/* Line 1455 of yacc.c  */
#line 775 "gram.y"
    { (yyval.ival) = COLUMN; ;}
    break;

  case 160:

/* Line 1455 of yacc.c  */
#line 776 "gram.y"
    { (yyval.ival) = 0; ;}
    break;

  case 161:

/* Line 1455 of yacc.c  */
#line 790 "gram.y"
    { QueryIsRule=TRUE; ;}
    break;

  case 162:

/* Line 1455 of yacc.c  */
#line 793 "gram.y"
    {
			printf("> unsupport sql statement\n");
		;}
    break;

  case 163:

/* Line 1455 of yacc.c  */
#line 798 "gram.y"
    { (yyval.list) = NIL; ;}
    break;

  case 164:

/* Line 1455 of yacc.c  */
#line 799 "gram.y"
    { (yyval.list) = lcons((yyvsp[(1) - (1)].node), NIL); ;}
    break;

  case 165:

/* Line 1455 of yacc.c  */
#line 800 "gram.y"
    { (yyval.list) = (yyvsp[(2) - (3)].list); ;}
    break;

  case 166:

/* Line 1455 of yacc.c  */
#line 804 "gram.y"
    { (yyval.list) = lcons((yyvsp[(1) - (1)].node), NIL); ;}
    break;

  case 167:

/* Line 1455 of yacc.c  */
#line 806 "gram.y"
    { (yyval.list) = lcons((yyvsp[(1) - (2)].node), NIL); ;}
    break;

  case 168:

/* Line 1455 of yacc.c  */
#line 808 "gram.y"
    {  (yyval.list) = lappend((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].node)); ;}
    break;

  case 169:

/* Line 1455 of yacc.c  */
#line 812 "gram.y"
    {
			printf("> unsupport sql statement\n");
		;}
    break;

  case 170:

/* Line 1455 of yacc.c  */
#line 816 "gram.y"
    {
			printf("> unsupport sql statement\n");
		;}
    break;

  case 171:

/* Line 1455 of yacc.c  */
#line 822 "gram.y"
    { (yyval.ival) = CMD_SELECT; ;}
    break;

  case 172:

/* Line 1455 of yacc.c  */
#line 823 "gram.y"
    { (yyval.ival) = CMD_UPDATE; ;}
    break;

  case 173:

/* Line 1455 of yacc.c  */
#line 824 "gram.y"
    { (yyval.ival) = CMD_DELETE; ;}
    break;

  case 174:

/* Line 1455 of yacc.c  */
#line 825 "gram.y"
    { (yyval.ival) = CMD_INSERT; ;}
    break;

  case 175:

/* Line 1455 of yacc.c  */
#line 828 "gram.y"
    { (yyval.boolean) = TRUE; ;}
    break;

  case 176:

/* Line 1455 of yacc.c  */
#line 829 "gram.y"
    { (yyval.boolean) = FALSE; ;}
    break;

  case 177:

/* Line 1455 of yacc.c  */
#line 842 "gram.y"
    {
					printf("> unsupport sql statement\n");
		;}
    break;

  case 178:

/* Line 1455 of yacc.c  */
#line 848 "gram.y"
    {
				   printf("> unsupport sql statement\n");
		;}
    break;

  case 179:

/* Line 1455 of yacc.c  */
#line 868 "gram.y"
    {
					printf("> unsupport sql statement\n");
		;}
    break;

  case 180:

/* Line 1455 of yacc.c  */
#line 872 "gram.y"
    {
					printf("> unsupport sql statement\n");
		;}
    break;

  case 181:

/* Line 1455 of yacc.c  */
#line 876 "gram.y"
    {
				   printf("> unsupport sql statement\n");
		;}
    break;

  case 182:

/* Line 1455 of yacc.c  */
#line 880 "gram.y"
    {
					printf("> unsupport sql statement\n");
		;}
    break;

  case 183:

/* Line 1455 of yacc.c  */
#line 884 "gram.y"
    {
				   printf("> unsupport sql statement\n");
		;}
    break;

  case 184:

/* Line 1455 of yacc.c  */
#line 888 "gram.y"
    {
				   printf("> unsupport sql statement\n");
		;}
    break;

  case 185:

/* Line 1455 of yacc.c  */
#line 893 "gram.y"
    {
					printf("> unsupport sql statement\n");
		;}
    break;

  case 186:

/* Line 1455 of yacc.c  */
#line 897 "gram.y"
    {
					printf("> unsupport sql statement\n");
		;}
    break;

  case 187:

/* Line 1455 of yacc.c  */
#line 901 "gram.y"
    {
					printf("> unsupport sql statement\n");
		;}
    break;

  case 188:

/* Line 1455 of yacc.c  */
#line 906 "gram.y"
    {
					printf("> unsupport sql statement\n");
		;}
    break;

  case 189:

/* Line 1455 of yacc.c  */
#line 910 "gram.y"
    {
					printf("> unsupport sql statement\n");
		;}
    break;

  case 190:

/* Line 1455 of yacc.c  */
#line 924 "gram.y"
    {
					printf("> unsupport sql statement\n");
		;}
    break;

  case 191:

/* Line 1455 of yacc.c  */
#line 938 "gram.y"
    {
					printf("> unsupport sql statement\n");
		;}
    break;

  case 192:

/* Line 1455 of yacc.c  */
#line 952 "gram.y"
    {
					printf("> unsupport sql statement\n");
		;}
    break;

  case 193:

/* Line 1455 of yacc.c  */
#line 966 "gram.y"
    {
					printf("> unsupport sql statement\n");
		;}
    break;

  case 194:

/* Line 1455 of yacc.c  */
#line 980 "gram.y"
    {
				  printf("> unsupport sql statement\n");
		;}
    break;

  case 195:

/* Line 1455 of yacc.c  */
#line 993 "gram.y"
    {
				   printf("> unsupport sql statement\n");
			   ;}
    break;

  case 196:

/* Line 1455 of yacc.c  */
#line 997 "gram.y"
    {
				   printf("> unsupport sql statement\n");
			   ;}
    break;

  case 197:

/* Line 1455 of yacc.c  */
#line 1010 "gram.y"
    {
					printf("> unsupport sql statement\n");
		;}
    break;

  case 198:

/* Line 1455 of yacc.c  */
#line 1016 "gram.y"
    { printf("> unsupport sql statement\n");;}
    break;

  case 199:

/* Line 1455 of yacc.c  */
#line 1018 "gram.y"
    { (yyval.list) = NIL; ;}
    break;

  case 206:

/* Line 1455 of yacc.c  */
#line 1049 "gram.y"
    {
			(yyvsp[(5) - (5)].astmt)->rel_name = (yyvsp[(3) - (5)].str);
			(yyvsp[(5) - (5)].astmt)->cols = (yyvsp[(4) - (5)].list);
			(yyval.node) = (node_t *)(yyvsp[(5) - (5)].astmt);
				;}
    break;

  case 207:

/* Line 1455 of yacc.c  */
#line 1057 "gram.y"
    {
			(yyval.astmt) = make_node(insert_stmt_t);
			(yyval.astmt)->exprs = (yyvsp[(3) - (4)].list);
			(yyval.astmt)->from_clause = NIL;
			(yyval.astmt)->where_clause = NULL;
		;}
    break;

  case 208:

/* Line 1455 of yacc.c  */
#line 1064 "gram.y"
    {
				   printf("> unsupport sql statement\n");
		;}
    break;

  case 209:

/* Line 1455 of yacc.c  */
#line 1069 "gram.y"
    { (yyval.list) = (yyvsp[(2) - (3)].list); ;}
    break;

  case 210:

/* Line 1455 of yacc.c  */
#line 1070 "gram.y"
    { (yyval.list) = NIL; ;}
    break;

  case 211:

/* Line 1455 of yacc.c  */
#line 1075 "gram.y"
    { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); ;}
    break;

  case 212:

/* Line 1455 of yacc.c  */
#line 1077 "gram.y"
    { (yyval.list) = lcons((yyvsp[(1) - (1)].node), NIL); ;}
    break;

  case 213:

/* Line 1455 of yacc.c  */
#line 1081 "gram.y"
    {
			ident_t *id = make_node(ident_t);
			id->name = (yyvsp[(1) - (2)].str);
			id->indirection = (yyvsp[(2) - (2)].list);
			(yyval.node) = (node_t *)id;
		;}
    break;

  case 214:

/* Line 1455 of yacc.c  */
#line 1090 "gram.y"
    { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); ;}
    break;

  case 215:

/* Line 1455 of yacc.c  */
#line 1092 "gram.y"
    { (yyval.list) = lcons((yyvsp[(1) - (1)].node), NIL); ;}
    break;

  case 216:

/* Line 1455 of yacc.c  */
#line 1097 "gram.y"
    {   (yyval.node) = (node_t *)(yyvsp[(1) - (1)].node);  ;}
    break;

  case 217:

/* Line 1455 of yacc.c  */
#line 1099 "gram.y"
    {
			printf("> unsupport sql statement\n");
		;}
    break;

  case 218:

/* Line 1455 of yacc.c  */
#line 1103 "gram.y"
    {
			attr_t *n = make_node(attr_t);
			n->rel_name = "*";
			n->attrs = NIL;
			(yyval.node) = (node_t *)n;
		;}
    break;

  case 219:

/* Line 1455 of yacc.c  */
#line 1121 "gram.y"
    {
			delete_stmt_t *n = make_node(delete_stmt_t);
			n->rel_name = (yyvsp[(3) - (4)].str);
			n->where_clause = (yyvsp[(4) - (4)].node);
			(yyval.node) = (node_t *)n;
		;}
    break;

  case 220:

/* Line 1455 of yacc.c  */
#line 1141 "gram.y"
    {
			update_stmt_t *n = make_node(update_stmt_t);
			n->rel_name = (yyvsp[(2) - (6)].str);
			n->target_list = (yyvsp[(4) - (6)].list);
			n->from_clause = (yyvsp[(5) - (6)].list);
			n->where_clause = (yyvsp[(6) - (6)].node);
			(yyval.node) = (node_t *)n;
				;}
    break;

  case 221:

/* Line 1455 of yacc.c  */
#line 1162 "gram.y"
    {
					printf("> unsupport sql statement\n");
		;}
    break;

  case 222:

/* Line 1455 of yacc.c  */
#line 1179 "gram.y"
    {
			select_stmt_t *n = make_node(select_stmt_t);
			n->unique = (yyvsp[(2) - (9)].str);
			n->target_list = (yyvsp[(3) - (9)].list);
			n->into = (yyvsp[(4) - (9)].str);
			n->from_clause = (yyvsp[(5) - (9)].list);
			n->where_clause = (yyvsp[(6) - (9)].node);
			n->group_clause = (yyvsp[(7) - (9)].list);
			n->having_clause = (yyvsp[(8) - (9)].node);
			n->order_clause = (yyvsp[(9) - (9)].list);
			(yyval.node) = (node_t *)n;
		;}
    break;

  case 223:

/* Line 1455 of yacc.c  */
#line 1194 "gram.y"
    {  (yyval.str)= (yyvsp[(3) - (3)].str);  /* should check for archive level */  ;}
    break;

  case 224:

/* Line 1455 of yacc.c  */
#line 1196 "gram.y"
    {  (yyval.str) = NULL;  ;}
    break;

  case 225:

/* Line 1455 of yacc.c  */
#line 1199 "gram.y"
    { (yyval.str) = "*"; ;}
    break;

  case 226:

/* Line 1455 of yacc.c  */
#line 1200 "gram.y"
    { (yyval.str) = (yyvsp[(3) - (3)].str); ;}
    break;

  case 227:

/* Line 1455 of yacc.c  */
#line 1201 "gram.y"
    { (yyval.str) = NULL;;}
    break;

  case 228:

/* Line 1455 of yacc.c  */
#line 1204 "gram.y"
    { (yyval.list) = (yyvsp[(3) - (3)].list); ;}
    break;

  case 229:

/* Line 1455 of yacc.c  */
#line 1205 "gram.y"
    { (yyval.list) = NIL; ;}
    break;

  case 230:

/* Line 1455 of yacc.c  */
#line 1209 "gram.y"
    { (yyval.list) = lcons((yyvsp[(1) - (1)].sortby), NIL); ;}
    break;

  case 231:

/* Line 1455 of yacc.c  */
#line 1211 "gram.y"
    { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].sortby)); ;}
    break;

  case 232:

/* Line 1455 of yacc.c  */
#line 1215 "gram.y"
    {
			(yyval.sortby) = make_node(sort_by_t);
			(yyval.sortby)->name = (yyvsp[(1) - (2)].str);
			(yyval.sortby)->use_op = (yyvsp[(2) - (2)].str);
		;}
    break;

  case 233:

/* Line 1455 of yacc.c  */
#line 1221 "gram.y"
    {
				  yyerror("parse error: use 'sort by attribute_name'");
				;}
    break;

  case 234:

/* Line 1455 of yacc.c  */
#line 1226 "gram.y"
    { (yyval.str) = (yyvsp[(2) - (2)].str); ;}
    break;

  case 235:

/* Line 1455 of yacc.c  */
#line 1227 "gram.y"
    { (yyval.str) = "<"; ;}
    break;

  case 236:

/* Line 1455 of yacc.c  */
#line 1228 "gram.y"
    { (yyval.str) = ">"; ;}
    break;

  case 237:

/* Line 1455 of yacc.c  */
#line 1229 "gram.y"
    { (yyval.str) = "<"; ;}
    break;

  case 238:

/* Line 1455 of yacc.c  */
#line 1230 "gram.y"
    { (yyval.str) = ">"; ;}
    break;

  case 239:

/* Line 1455 of yacc.c  */
#line 1231 "gram.y"
    { (yyval.str) = "<"; /*default*/ ;}
    break;

  case 240:

/* Line 1455 of yacc.c  */
#line 1235 "gram.y"
    { (yyval.list) = lcons((yyvsp[(1) - (1)].ielem),NIL); ;}
    break;

  case 241:

/* Line 1455 of yacc.c  */
#line 1236 "gram.y"
    { (yyval.list) = lcons((yyvsp[(1) - (1)].ielem),NIL); ;}
    break;

  case 242:

/* Line 1455 of yacc.c  */
#line 1247 "gram.y"
    {
				   printf("> unsupport sql statement\n");
		;}
    break;

  case 243:

/* Line 1455 of yacc.c  */
#line 1253 "gram.y"
    {
					printf("> unsupport sql statement\n");
				;}
    break;

  case 245:

/* Line 1455 of yacc.c  */
#line 1259 "gram.y"
    { (yyval.str) = (yyvsp[(2) - (2)].str); ;}
    break;

  case 246:

/* Line 1455 of yacc.c  */
#line 1260 "gram.y"
    { (yyval.str) = NULL; ;}
    break;

  case 247:

/* Line 1455 of yacc.c  */
#line 1272 "gram.y"
    { (yyval.boolean) = TRUE; ;}
    break;

  case 248:

/* Line 1455 of yacc.c  */
#line 1273 "gram.y"
    { (yyval.boolean) = FALSE; ;}
    break;

  case 250:

/* Line 1455 of yacc.c  */
#line 1279 "gram.y"
    { (yyval.list)=lcons(make_string((yyvsp[(1) - (1)].str)),NIL); ;}
    break;

  case 251:

/* Line 1455 of yacc.c  */
#line 1281 "gram.y"
    { (yyval.list)=lappend((yyvsp[(1) - (3)].list),make_string((yyvsp[(3) - (3)].str))); ;}
    break;

  case 252:

/* Line 1455 of yacc.c  */
#line 1284 "gram.y"
    { (yyval.list) = (yyvsp[(3) - (3)].list); ;}
    break;

  case 253:

/* Line 1455 of yacc.c  */
#line 1285 "gram.y"
    { (yyval.list) = NIL; ;}
    break;

  case 254:

/* Line 1455 of yacc.c  */
#line 1288 "gram.y"
    { (yyval.list) = lcons((yyvsp[(1) - (1)].node), NIL); ;}
    break;

  case 255:

/* Line 1455 of yacc.c  */
#line 1289 "gram.y"
    { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); ;}
    break;

  case 256:

/* Line 1455 of yacc.c  */
#line 1293 "gram.y"
    {
		   ident_t *n = make_node(ident_t);
		   n->name = (yyvsp[(1) - (1)].str);
		   (yyval.node) = (node_t*)n;
		;}
    break;

  case 257:

/* Line 1455 of yacc.c  */
#line 1299 "gram.y"
    {
		   (yyval.node) = (node_t*)(yyvsp[(1) - (1)].attr);
		;}
    break;

  case 258:

/* Line 1455 of yacc.c  */
#line 1304 "gram.y"
    { (yyval.node) = (yyvsp[(2) - (2)].node); ;}
    break;

  case 259:

/* Line 1455 of yacc.c  */
#line 1305 "gram.y"
    { (yyval.node) = NULL; ;}
    break;

  case 260:

/* Line 1455 of yacc.c  */
#line 1316 "gram.y"
    { (yyval.list) = (yyvsp[(2) - (2)].list); ;}
    break;

  case 261:

/* Line 1455 of yacc.c  */
#line 1317 "gram.y"
    { (yyval.list) = NIL; ;}
    break;

  case 262:

/* Line 1455 of yacc.c  */
#line 1321 "gram.y"
    { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].range)); ;}
    break;

  case 263:

/* Line 1455 of yacc.c  */
#line 1323 "gram.y"
    { (yyval.list) = lcons((yyvsp[(1) - (1)].range), NIL); ;}
    break;

  case 264:

/* Line 1455 of yacc.c  */
#line 1327 "gram.y"
    {
			(yyval.range) = make_node(range_var_t);
			(yyval.range)->rel_expr = (yyvsp[(1) - (3)].relexp);
			(yyval.range)->name = (yyvsp[(3) - (3)].str);
		;}
    break;

  case 265:

/* Line 1455 of yacc.c  */
#line 1333 "gram.y"
    {
			(yyval.range) = make_node(range_var_t);
			(yyval.range)->rel_expr = (yyvsp[(1) - (2)].relexp);
			(yyval.range)->name = (yyvsp[(2) - (2)].str);
		;}
    break;

  case 266:

/* Line 1455 of yacc.c  */
#line 1339 "gram.y"
    {
			(yyval.range) = make_node(range_var_t);
			(yyval.range)->rel_expr = (yyvsp[(1) - (1)].relexp);
			(yyval.range)->name = NULL;
		;}
    break;

  case 267:

/* Line 1455 of yacc.c  */
#line 1346 "gram.y"
    { (yyval.node) = (yyvsp[(2) - (2)].node); ;}
    break;

  case 268:

/* Line 1455 of yacc.c  */
#line 1347 "gram.y"
    { (yyval.node) = NULL;  /* no qualifiers */ ;}
    break;

  case 269:

/* Line 1455 of yacc.c  */
#line 1351 "gram.y"
    {
			/* normal relations */
			(yyval.relexp) = make_node(rel_expr_t);
			(yyval.relexp)->rel_name = (yyvsp[(1) - (1)].str);
			(yyval.relexp)->inh = FALSE;
			(yyval.relexp)->time_range = NULL;
		;}
    break;

  case 270:

/* Line 1455 of yacc.c  */
#line 1359 "gram.y"
    {
			/* inheiritance query */
			(yyval.relexp) = make_node(rel_expr_t);
			(yyval.relexp)->rel_name = (yyvsp[(1) - (2)].str);
			(yyval.relexp)->inh = TRUE;
			(yyval.relexp)->time_range = NULL;
		;}
    break;

  case 271:

/* Line 1455 of yacc.c  */
#line 1367 "gram.y"
    {
			/* time-qualified query */
			(yyval.relexp) = make_node(rel_expr_t);
			(yyval.relexp)->rel_name = (yyvsp[(1) - (2)].str);
			(yyval.relexp)->inh = FALSE;
			(yyval.relexp)->time_range = (yyvsp[(2) - (2)].trange);
		;}
    break;

  case 272:

/* Line 1455 of yacc.c  */
#line 1378 "gram.y"
    {
			(yyval.trange) = make_node(time_range_t);
			(yyval.trange)->start_date = (yyvsp[(2) - (5)].str);
			(yyval.trange)->end_date = (yyvsp[(4) - (5)].str);
		;}
    break;

  case 273:

/* Line 1455 of yacc.c  */
#line 1384 "gram.y"
    {
			(yyval.trange) = make_node(time_range_t);
			(yyval.trange)->start_date = (yyvsp[(2) - (3)].str);
			(yyval.trange)->end_date = NULL;
		;}
    break;

  case 275:

/* Line 1455 of yacc.c  */
#line 1392 "gram.y"
    { (yyval.str) = "epoch"; ;}
    break;

  case 277:

/* Line 1455 of yacc.c  */
#line 1396 "gram.y"
    { (yyval.str) = "now"; ;}
    break;

  case 278:

/* Line 1455 of yacc.c  */
#line 1400 "gram.y"
    {  (yyval.list) = lcons(make_integer(-1), (yyvsp[(3) - (3)].list)); ;}
    break;

  case 279:

/* Line 1455 of yacc.c  */
#line 1402 "gram.y"
    {  (yyval.list) = lcons(make_integer((yyvsp[(2) - (4)].ival)), (yyvsp[(4) - (4)].list)); ;}
    break;

  case 280:

/* Line 1455 of yacc.c  */
#line 1404 "gram.y"
    {  (yyval.list) = NIL; ;}
    break;

  case 281:

/* Line 1455 of yacc.c  */
#line 1408 "gram.y"
    {  (yyval.list) = lcons(make_integer(-1), (yyvsp[(3) - (3)].list)); ;}
    break;

  case 282:

/* Line 1455 of yacc.c  */
#line 1410 "gram.y"
    {  (yyval.list) = lcons(make_integer((yyvsp[(2) - (4)].ival)), (yyvsp[(4) - (4)].list)); ;}
    break;

  case 283:

/* Line 1455 of yacc.c  */
#line 1412 "gram.y"
    {  (yyval.list) = NIL; ;}
    break;

  case 284:

/* Line 1455 of yacc.c  */
#line 1416 "gram.y"
    {
			const char *tname = xlateSqlType((yyvsp[(1) - (1)].str));
			(yyval.typnam) = make_node(type_name_t);
			(yyval.typnam)->name = tname;

			/* Is this the name of a complex type? If so, implement
			 * it as a set.
			 *
			if (!strcmp(saved_rel_name, tname)) {
			$$->setof = TRUE;
			}else if (get_typrelid((Type)type(tname)) != InvalidOid) {
			$$->setof = TRUE;
				} else {
			$$->setof = FALSE;
			}*/
			/* coanor: I comment this, because there will 3 errors while compiled
					 * in msvc9, and almost no hint that it is a 'if...else' unmatched.
					 * 2010.3.31 */
		;}
    break;

  case 285:

/* Line 1455 of yacc.c  */
#line 1436 "gram.y"
    {
			(yyval.typnam) = make_node(type_name_t);
			(yyval.typnam)->name = (yyvsp[(2) - (2)].str);
		;}
    break;

  case 286:

/* Line 1455 of yacc.c  */
#line 1443 "gram.y"
    {
			(yyval.typnam) = (yyvsp[(1) - (2)].typnam);
			/*
			$$->arrayBounds = $2; */
		;}
    break;

  case 287:

/* Line 1455 of yacc.c  */
#line 1449 "gram.y"
    {
			printf("> unspported statement.\n");
		;}
    break;

  case 288:

/* Line 1455 of yacc.c  */
#line 1462 "gram.y"
    {
			printf("> unsupported statement\n");
		;}
    break;

  case 289:

/* Line 1455 of yacc.c  */
#line 1466 "gram.y"
    {   (yyval.node) = (yyvsp[(1) - (1)].node);  ;}
    break;

  case 290:

/* Line 1455 of yacc.c  */
#line 1468 "gram.y"
    {   (yyval.node) = make_a_expr(OP, "-", NULL, (yyvsp[(2) - (2)].node)); ;}
    break;

  case 291:

/* Line 1455 of yacc.c  */
#line 1470 "gram.y"
    {   (yyval.node) = make_a_expr(OP, "+", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); ;}
    break;

  case 292:

/* Line 1455 of yacc.c  */
#line 1472 "gram.y"
    {   (yyval.node) = make_a_expr(OP, "-", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); ;}
    break;

  case 293:

/* Line 1455 of yacc.c  */
#line 1474 "gram.y"
    {   (yyval.node) = make_a_expr(OP, "/", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); ;}
    break;

  case 294:

/* Line 1455 of yacc.c  */
#line 1476 "gram.y"
    {   (yyval.node) = make_a_expr(OP, "*", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); ;}
    break;

  case 295:

/* Line 1455 of yacc.c  */
#line 1478 "gram.y"
    {   (yyval.node) = make_a_expr(OP, "<", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); ;}
    break;

  case 296:

/* Line 1455 of yacc.c  */
#line 1480 "gram.y"
    {   (yyval.node) = make_a_expr(OP, ">", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); ;}
    break;

  case 297:

/* Line 1455 of yacc.c  */
#line 1482 "gram.y"
    {   (yyval.node) = make_a_expr(OP, "=", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); ;}
    break;

  case 298:

/* Line 1455 of yacc.c  */
#line 1484 "gram.y"
    {   (yyval.node) = make_a_expr(OP, ":", NULL, (yyvsp[(2) - (2)].node)); ;}
    break;

  case 299:

/* Line 1455 of yacc.c  */
#line 1486 "gram.y"
    {   (yyval.node) = make_a_expr(OP, ";", NULL, (yyvsp[(2) - (2)].node)); ;}
    break;

  case 300:

/* Line 1455 of yacc.c  */
#line 1488 "gram.y"
    {   (yyval.node) = make_a_expr(OP, "|", NULL, (yyvsp[(2) - (2)].node)); ;}
    break;

  case 301:

/* Line 1455 of yacc.c  */
#line 1490 "gram.y"
    {
			printf("> unsupported statement")
		;}
    break;

  case 302:

/* Line 1455 of yacc.c  */
#line 1494 "gram.y"
    {
			printf("> unsupported statement\n");
		;}
    break;

  case 303:

/* Line 1455 of yacc.c  */
#line 1498 "gram.y"
    {   (yyval.node) = (yyvsp[(2) - (3)].node); ;}
    break;

  case 304:

/* Line 1455 of yacc.c  */
#line 1500 "gram.y"
    {   (yyval.node) = make_a_expr(OP, (yyvsp[(2) - (3)].str), (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); ;}
    break;

  case 305:

/* Line 1455 of yacc.c  */
#line 1502 "gram.y"
    {   (yyval.node) = make_a_expr(OP, "~~", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); ;}
    break;

  case 306:

/* Line 1455 of yacc.c  */
#line 1504 "gram.y"
    {   (yyval.node) = make_a_expr(OP, "!~~", (yyvsp[(1) - (4)].node), (yyvsp[(4) - (4)].node)); ;}
    break;

  case 307:

/* Line 1455 of yacc.c  */
#line 1506 "gram.y"
    {   (yyval.node) = make_a_expr(OP, (yyvsp[(1) - (2)].str), NULL, (yyvsp[(2) - (2)].node)); ;}
    break;

  case 308:

/* Line 1455 of yacc.c  */
#line 1508 "gram.y"
    {   (yyval.node) = make_a_expr(OP, (yyvsp[(2) - (2)].str), (yyvsp[(1) - (2)].node), NULL); ;}
    break;

  case 309:

/* Line 1455 of yacc.c  */
#line 1510 "gram.y"
    {   /* could be a column name or a relation_name */
			ident_t *n = make_node(ident_t);
			n->name = (yyvsp[(1) - (1)].str);
			(yyval.node) = (node_t *)n;
		;}
    break;

  case 310:

/* Line 1455 of yacc.c  */
#line 1516 "gram.y"
    {
			printf("> unspported statement\n");
		;}
    break;

  case 311:

/* Line 1455 of yacc.c  */
#line 1520 "gram.y"
    {
			printf("> unspported statement\n");
		;}
    break;

  case 312:

/* Line 1455 of yacc.c  */
#line 1524 "gram.y"
    {
			printf("> unspported statement\n");
		;}
    break;

  case 313:

/* Line 1455 of yacc.c  */
#line 1528 "gram.y"
    {   (yyval.node) = make_a_expr(ISNULL, NULL, (yyvsp[(1) - (2)].node), NULL); ;}
    break;

  case 314:

/* Line 1455 of yacc.c  */
#line 1530 "gram.y"
    {   (yyval.node) = make_a_expr(NOTNULL, NULL, (yyvsp[(1) - (2)].node), NULL); ;}
    break;

  case 315:

/* Line 1455 of yacc.c  */
#line 1532 "gram.y"
    {   (yyval.node) = make_a_expr(AND, NULL, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); ;}
    break;

  case 316:

/* Line 1455 of yacc.c  */
#line 1534 "gram.y"
    {   (yyval.node) = make_a_expr(OR, NULL, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); ;}
    break;

  case 317:

/* Line 1455 of yacc.c  */
#line 1536 "gram.y"
    {   (yyval.node) = make_a_expr(NOT, NULL, NULL, (yyvsp[(2) - (2)].node)); ;}
    break;

  case 318:

/* Line 1455 of yacc.c  */
#line 1540 "gram.y"
    {
			a_indices_t *ai = make_node(a_indices_t);
			ai->lidx = NULL;
			ai->uidx = (yyvsp[(2) - (4)].node);
			(yyval.list) = lcons(ai, (yyvsp[(4) - (4)].list));
		;}
    break;

  case 319:

/* Line 1455 of yacc.c  */
#line 1547 "gram.y"
    {
			a_indices_t *ai = make_node(a_indices_t);
			ai->lidx = (yyvsp[(2) - (6)].node);
			ai->uidx = (yyvsp[(4) - (6)].node);
			(yyval.list) = lcons(ai, (yyvsp[(6) - (6)].list));
		;}
    break;

  case 320:

/* Line 1455 of yacc.c  */
#line 1554 "gram.y"
    {   (yyval.list) = NIL; ;}
    break;

  case 321:

/* Line 1455 of yacc.c  */
#line 1558 "gram.y"
    { (yyval.list) = lcons((yyvsp[(1) - (1)].node), NIL); ;}
    break;

  case 322:

/* Line 1455 of yacc.c  */
#line 1560 "gram.y"
    { (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); ;}
    break;

  case 323:

/* Line 1455 of yacc.c  */
#line 1564 "gram.y"
    {
			(yyval.attr) = make_node(attr_t);
			(yyval.attr)->rel_name = (yyvsp[(1) - (3)].str);
			(yyval.attr)->attrs = (yyvsp[(3) - (3)].list);
		;}
    break;

  case 324:

/* Line 1455 of yacc.c  */
#line 1570 "gram.y"
    {
			printf("> unsupported statement\n");
		;}
    break;

  case 325:

/* Line 1455 of yacc.c  */
#line 1576 "gram.y"
    { (yyval.list) = lcons(make_string((yyvsp[(1) - (1)].str)), NIL); ;}
    break;

  case 326:

/* Line 1455 of yacc.c  */
#line 1578 "gram.y"
    { (yyval.list) = lappend((yyvsp[(1) - (3)].list), make_string((yyvsp[(3) - (3)].str))); ;}
    break;

  case 327:

/* Line 1455 of yacc.c  */
#line 1580 "gram.y"
    { (yyval.list) = lappend((yyvsp[(1) - (3)].list), make_string("*")); ;}
    break;

  case 328:

/* Line 1455 of yacc.c  */
#line 1591 "gram.y"
    {   (yyval.list) = lappend((yyvsp[(1) - (3)].list),(yyvsp[(3) - (3)].target));  ;}
    break;

  case 329:

/* Line 1455 of yacc.c  */
#line 1593 "gram.y"
    {   (yyval.list) = lcons((yyvsp[(1) - (1)].target), NIL);  ;}
    break;

  case 330:

/* Line 1455 of yacc.c  */
#line 1595 "gram.y"
    {
			res_target_t *rt = make_node(res_target_t);
			attr_t *att = make_node(attr_t);
			att->rel_name = "*";
			att->attrs = NULL;
			rt->name = NULL;
			rt->val = (node_t *)att;
			(yyval.list) = lcons(rt, NIL);
		;}
    break;

  case 331:

/* Line 1455 of yacc.c  */
#line 1607 "gram.y"
    {
			printf("unsupported statement\n");
		;}
    break;

  case 332:

/* Line 1455 of yacc.c  */
#line 1611 "gram.y"
    {
printf("> unsupported statement\n");
		;}
    break;

  case 333:

/* Line 1455 of yacc.c  */
#line 1615 "gram.y"
    {
			attr_t *att = make_node(attr_t);
			att->rel_name = (yyvsp[(1) - (3)].str);
			att->attrs = lcons(make_string("*"), NIL);
			(yyval.target) = make_node(res_target_t);
			(yyval.target)->name = NULL;
			(yyval.target)->val = (node_t *)att;
		;}
    break;

  case 334:

/* Line 1455 of yacc.c  */
#line 1632 "gram.y"
    {   (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].target));  ;}
    break;

  case 335:

/* Line 1455 of yacc.c  */
#line 1634 "gram.y"
    {   (yyval.list) = lcons((yyvsp[(1) - (1)].target), NIL);  ;}
    break;

  case 336:

/* Line 1455 of yacc.c  */
#line 1636 "gram.y"
    {
			res_target_t *rt = make_node(res_target_t);
			attr_t *att = make_node(attr_t);
			att->rel_name = "*";
			att->attrs = NULL;
			rt->name = NULL;
			rt->val = (node_t *)att;
			(yyval.list) = lcons(rt, NIL);
		;}
    break;

  case 337:

/* Line 1455 of yacc.c  */
#line 1649 "gram.y"
    {
			(yyval.target) = make_node(res_target_t);
			(yyval.target)->name = (yyvsp[(3) - (3)].str);
			(yyval.target)->indirection = NULL;
			(yyval.target)->val = (node_t *)(yyvsp[(1) - (3)].node);
		;}
    break;

  case 338:

/* Line 1455 of yacc.c  */
#line 1656 "gram.y"
    {
			(yyval.target) = make_node(res_target_t);
			(yyval.target)->name = NULL;
			(yyval.target)->val = (node_t *)(yyvsp[(1) - (1)].node);
		;}
    break;

  case 339:

/* Line 1455 of yacc.c  */
#line 1662 "gram.y"
    {
			attr_t *att = make_node(attr_t);
			att->rel_name = (yyvsp[(1) - (3)].str);
			att->attrs = lcons(make_string("*"), NIL);
			(yyval.target) = make_node(res_target_t);
			(yyval.target)->name = NULL;
			(yyval.target)->val = (node_t *)att;
		;}
    break;

  case 340:

/* Line 1455 of yacc.c  */
#line 1672 "gram.y"
    { (yyval.str) = (yyvsp[(1) - (1)].str); ;}
    break;

  case 341:

/* Line 1455 of yacc.c  */
#line 1673 "gram.y"
    { (yyval.str) = NULL; ;}
    break;

  case 342:

/* Line 1455 of yacc.c  */
#line 1677 "gram.y"
    {
				   (yyval.str) = (yyvsp[(1) - (1)].str);
				   strcpy(saved_rel_name, (yyvsp[(1) - (1)].str));
			;}
    break;

  case 343:

/* Line 1455 of yacc.c  */
#line 1682 "gram.y"
    {
			/* disallow refs to magic system tables */
			if (0) {
			elog(WARN, "%s cannot be accessed by users", (yyvsp[(1) - (1)].str));
			} else {
			(yyval.str) = (yyvsp[(1) - (1)].str);
			}
			strcpy(saved_rel_name, (yyvsp[(1) - (1)].str));
		;}
    break;

  case 344:

/* Line 1455 of yacc.c  */
#line 1693 "gram.y"
    { (yyval.str) = (yyvsp[(1) - (1)].str); ;}
    break;

  case 345:

/* Line 1455 of yacc.c  */
#line 1694 "gram.y"
    { (yyval.str) = (yyvsp[(1) - (1)].str); ;}
    break;

  case 346:

/* Line 1455 of yacc.c  */
#line 1695 "gram.y"
    { (yyval.str) = (yyvsp[(1) - (1)].str); ;}
    break;

  case 347:

/* Line 1455 of yacc.c  */
#line 1696 "gram.y"
    { (yyval.str) = (yyvsp[(1) - (1)].str); ;}
    break;

  case 348:

/* Line 1455 of yacc.c  */
#line 1697 "gram.y"
    { (yyval.str) = (yyvsp[(1) - (1)].str); ;}
    break;

  case 349:

/* Line 1455 of yacc.c  */
#line 1698 "gram.y"
    { (yyval.str) = (yyvsp[(1) - (1)].str); ;}
    break;

  case 350:

/* Line 1455 of yacc.c  */
#line 1699 "gram.y"
    { (yyval.str) = (yyvsp[(1) - (1)].str); ;}
    break;

  case 351:

/* Line 1455 of yacc.c  */
#line 1701 "gram.y"
    { (yyval.str) = (yyvsp[(1) - (1)].str); ;}
    break;

  case 352:

/* Line 1455 of yacc.c  */
#line 1702 "gram.y"
    { (yyval.str) = (yyvsp[(1) - (1)].str); ;}
    break;

  case 353:

/* Line 1455 of yacc.c  */
#line 1703 "gram.y"
    { (yyval.str) = (yyvsp[(1) - (1)].str); ;}
    break;

  case 354:

/* Line 1455 of yacc.c  */
#line 1706 "gram.y"
    {
			a_const_t *n = make_node(a_const_t);
			n->val.type = T_integer_t;
			n->val.val.ival = (yyvsp[(1) - (1)].ival);
			(yyval.node) = (node_t *)n;
		;}
    break;

  case 355:

/* Line 1455 of yacc.c  */
#line 1713 "gram.y"
    {
			a_const_t *n = make_node(a_const_t);
			n->val.type = T_float_t;
			n->val.val.dval = (yyvsp[(1) - (1)].dval);
			(yyval.node) = (node_t *)n;
		;}
    break;

  case 356:

/* Line 1455 of yacc.c  */
#line 1720 "gram.y"
    {
			a_const_t *n = make_node(a_const_t);
			n->val.type = T_string_t;
			n->val.val.str = (yyvsp[(1) - (1)].str);
			(yyval.node) = (node_t *)n;
		;}
    break;

  case 357:

/* Line 1455 of yacc.c  */
#line 1727 "gram.y"
    {   (yyval.node) = (node_t *)(yyvsp[(1) - (1)].paramno);  ;}
    break;

  case 358:

/* Line 1455 of yacc.c  */
#line 1729 "gram.y"
    {
			a_const_t *n = make_node(a_const_t);
			n->val.type = T_Null;
			(yyval.node) = (node_t *)n;
		;}
    break;

  case 359:

/* Line 1455 of yacc.c  */
#line 1737 "gram.y"
    {
			printf("unsupported statement\n");
		;}
    break;

  case 360:

/* Line 1455 of yacc.c  */
#line 1742 "gram.y"
    { (yyval.value) = make_integer((yyvsp[(1) - (1)].ival)); ;}
    break;

  case 361:

/* Line 1455 of yacc.c  */
#line 1743 "gram.y"
    { (yyval.value) = make_float((yyvsp[(1) - (1)].dval)); ;}
    break;

  case 362:

/* Line 1455 of yacc.c  */
#line 1746 "gram.y"
    { (yyval.ival) = (yyvsp[(1) - (1)].ival); ;}
    break;

  case 363:

/* Line 1455 of yacc.c  */
#line 1747 "gram.y"
    { (yyval.str) = (yyvsp[(1) - (1)].str); ;}
    break;

  case 364:

/* Line 1455 of yacc.c  */
#line 1749 "gram.y"
    { (yyval.str) = (yyvsp[(1) - (1)].str); ;}
    break;

  case 365:

/* Line 1455 of yacc.c  */
#line 1752 "gram.y"
    {
			if (QueryIsRule)
			(yyval.str) = "*CURRENT*";
			else
			elog(WARN,"CURRENT used in non-rule query");
		;}
    break;

  case 366:

/* Line 1455 of yacc.c  */
#line 1759 "gram.y"
    {
			if (QueryIsRule)
			(yyval.str) = "*NEW*";
			else
			elog(WARN,"NEW used in non-rule query");
		;}
    break;



/* Line 1455 of yacc.c  */
#line 4842 "gram.tab.c"
      default: break;
    }
  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);

  YYPOPSTACK (yylen);
  yylen = 0;
  YY_STACK_PRINT (yyss, yyssp);

  *++yyvsp = yyval;

  /* Now `shift' the result of the reduction.  Determine what state
     that goes to, based on the state we popped back to and the rule
     number reduced by.  */

  yyn = yyr1[yyn];

  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
    yystate = yytable[yystate];
  else
    yystate = yydefgoto[yyn - YYNTOKENS];

  goto yynewstate;


/*------------------------------------.
| yyerrlab -- here on detecting error |
`------------------------------------*/
yyerrlab:
  /* If not already recovering from an error, report this error.  */
  if (!yyerrstatus)
    {
      ++yynerrs;
#if ! YYERROR_VERBOSE
      yyerror (YY_("syntax error"));
#else
      {
	YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
	if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
	  {
	    YYSIZE_T yyalloc = 2 * yysize;
	    if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
	      yyalloc = YYSTACK_ALLOC_MAXIMUM;
	    if (yymsg != yymsgbuf)
	      YYSTACK_FREE (yymsg);
	    yymsg = (char *) YYSTACK_ALLOC (yyalloc);
	    if (yymsg)
	      yymsg_alloc = yyalloc;
	    else
	      {
		yymsg = yymsgbuf;
		yymsg_alloc = sizeof yymsgbuf;
	      }
	  }

	if (0 < yysize && yysize <= yymsg_alloc)
	  {
	    (void) yysyntax_error (yymsg, yystate, yychar);
	    yyerror (yymsg);
	  }
	else
	  {
	    yyerror (YY_("syntax error"));
	    if (yysize != 0)
	      goto yyexhaustedlab;
	  }
      }
#endif
    }



  if (yyerrstatus == 3)
    {
      /* If just tried and failed to reuse lookahead token after an
	 error, discard it.  */

      if (yychar <= YYEOF)
	{
	  /* Return failure if at end of input.  */
	  if (yychar == YYEOF)
	    YYABORT;
	}
      else
	{
	  yydestruct ("Error: discarding",
		      yytoken, &yylval);
	  yychar = YYEMPTY;
	}
    }

  /* Else will try to reuse lookahead token after shifting the error
     token.  */
  goto yyerrlab1;


/*---------------------------------------------------.
| yyerrorlab -- error raised explicitly by YYERROR.  |
`---------------------------------------------------*/
yyerrorlab:

  /* Pacify compilers like GCC when the user code never invokes
     YYERROR and the label yyerrorlab therefore never appears in user
     code.  */
  if (/*CONSTCOND*/ 0)
     goto yyerrorlab;

  /* Do not reclaim the symbols of the rule which action triggered
     this YYERROR.  */
  YYPOPSTACK (yylen);
  yylen = 0;
  YY_STACK_PRINT (yyss, yyssp);
  yystate = *yyssp;
  goto yyerrlab1;


/*-------------------------------------------------------------.
| yyerrlab1 -- common code for both syntax error and YYERROR.  |
`-------------------------------------------------------------*/
yyerrlab1:
  yyerrstatus = 3;	/* Each real token shifted decrements this.  */

  for (;;)
    {
      yyn = yypact[yystate];
      if (yyn != YYPACT_NINF)
	{
	  yyn += YYTERROR;
	  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
	    {
	      yyn = yytable[yyn];
	      if (0 < yyn)
		break;
	    }
	}

      /* Pop the current state because it cannot handle the error token.  */
      if (yyssp == yyss)
	YYABORT;


      yydestruct ("Error: popping",
		  yystos[yystate], yyvsp);
      YYPOPSTACK (1);
      yystate = *yyssp;
      YY_STACK_PRINT (yyss, yyssp);
    }

  *++yyvsp = yylval;


  /* Shift the error token.  */
  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);

  yystate = yyn;
  goto yynewstate;


/*-------------------------------------.
| yyacceptlab -- YYACCEPT comes here.  |
`-------------------------------------*/
yyacceptlab:
  yyresult = 0;
  goto yyreturn;

/*-----------------------------------.
| yyabortlab -- YYABORT comes here.  |
`-----------------------------------*/
yyabortlab:
  yyresult = 1;
  goto yyreturn;

#if !defined(yyoverflow) || YYERROR_VERBOSE
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here.  |
`-------------------------------------------------*/
yyexhaustedlab:
  yyerror (YY_("memory exhausted"));
  yyresult = 2;
  /* Fall through.  */
#endif

yyreturn:
  if (yychar != YYEMPTY)
     yydestruct ("Cleanup: discarding lookahead",
		 yytoken, &yylval);
  /* Do not reclaim the symbols of the rule which action triggered
     this YYABORT or YYACCEPT.  */
  YYPOPSTACK (yylen);
  YY_STACK_PRINT (yyss, yyssp);
  while (yyssp != yyss)
    {
      yydestruct ("Cleanup: popping",
		  yystos[*yyssp], yyvsp);
      YYPOPSTACK (1);
    }
#ifndef yyoverflow
  if (yyss != yyssa)
    YYSTACK_FREE (yyss);
#endif
#if YYERROR_VERBOSE
  if (yymsg != yymsgbuf)
    YYSTACK_FREE (yymsg);
#endif
  /* Make sure YYID is used.  */
  return YYID (yyresult);
}



/* Line 1675 of yacc.c  */
#line 1770 "gram.y"


static node_t *make_a_expr(int op, char *opname, node_t *lexpr, node_t *rexpr)
{
	a_expr_t *a = make_node(a_expr_t);
	a->oper = op;
	a->opname = opname;
	a->lexpr = lexpr;
	a->rexpr = rexpr;
	return (node_t *)a;
}

static const char *
xlateSqlType(char *name)
{
	if (!strcasecmp(name,"int") || !strcasecmp(name,"integer"))
		return "int4"; /* strdup("int4") --   strdup leaks memory here */
	else if (!strcasecmp(name, "smallint"))
		return "int2";
	else if (!strcasecmp(name, "float") || !strcasecmp(name, "real"))
		return "float4";
	else
		return name;
}

void parser_init(oid_t *typev, int nargs)
{
	QueryIsRule = false;
	saved_rel_name[0]= '\0';

	//param_type_init(typev, nargs);
}


